Add ability to add private group test data in settings

This commit is contained in:
Sebastian Kürten
2023-03-29 18:59:28 +02:00
committed by ialokim
parent f8015272f4
commit 0eb0bbdc99
3 changed files with 106 additions and 48 deletions

View File

@@ -470,10 +470,6 @@ public class TestDataCreatorImpl implements TestDataCreator {
private void createRandomForumPosts(Forum forum, List<Contact> contacts,
int numForumPosts) throws DbException {
if (contacts.isEmpty() && LOG.isLoggable(INFO)) {
LOG.info("No forum posts created due to missing contacts.");
return;
}
List<ForumPost> posts = new ArrayList<>();
for (int i = 0; i < numForumPosts; i++) {
Contact contact = contacts.get(random.nextInt(contacts.size()));
@@ -522,11 +518,6 @@ public class TestDataCreatorImpl implements TestDataCreator {
private void createRandomPrivateGroupMessages(PrivateGroup group,
List<Contact> contacts, int amount) throws DbException {
if (contacts.isEmpty() && LOG.isLoggable(INFO)) {
LOG.info("No private group messages created " +
"due to missing contacts.");
return;
}
List<GroupMessage> messages = new ArrayList<>();
PrivateKey creatorPrivateKey =
identityManager.getLocalAuthor().getPrivateKey();