Allow messages to be marked as temporary.

This commit is contained in:
akwizgran
2019-06-12 15:11:10 +01:00
parent dd7accfa95
commit cd40e771d2
17 changed files with 267 additions and 89 deletions

View File

@@ -270,7 +270,7 @@ class IntroductionManagerImpl extends ConversationClientImpl
private MessageId createStorageId(Transaction txn) throws DbException {
Message m = clientHelper
.createMessageForStoringMetadata(localGroup.getId());
db.addLocalMessage(txn, m, new Metadata(), false);
db.addLocalMessage(txn, m, new Metadata(), false, false);
return m.getId();
}

View File

@@ -248,7 +248,7 @@ class GroupInvitationManagerImpl extends ConversationClientImpl
private MessageId createStorageId(Transaction txn, GroupId g)
throws DbException {
Message m = clientHelper.createMessageForStoringMetadata(g);
db.addLocalMessage(txn, m, new Metadata(), false);
db.addLocalMessage(txn, m, new Metadata(), false, false);
return m.getId();
}

View File

@@ -240,7 +240,7 @@ abstract class SharingManagerImpl<S extends Shareable>
private MessageId createStorageId(Transaction txn, GroupId g)
throws DbException {
Message m = clientHelper.createMessageForStoringMetadata(g);
db.addLocalMessage(txn, m, new Metadata(), false);
db.addLocalMessage(txn, m, new Metadata(), false, false);
return m.getId();
}

View File

@@ -226,7 +226,7 @@ public class GroupInvitationManagerImplTest extends BrambleMockTestCase {
.createMessageForStoringMetadata(contactGroup.getId());
will(returnValue(storageMessage));
oneOf(db).addLocalMessage(txn, storageMessage, new Metadata(),
false);
false, false);
}});
}

View File

@@ -221,7 +221,8 @@ public class BlogSharingManagerImplTest extends BrambleMockTestCase {
oneOf(clientHelper)
.createMessageForStoringMetadata(contactGroup.getId());
will(returnValue(message));
oneOf(db).addLocalMessage(txn, message, new Metadata(), false);
oneOf(db).addLocalMessage(txn, message, new Metadata(), false,
false);
oneOf(sessionEncoder).encodeSession(with(any(Session.class)));
will(returnValue(sessionDict));
oneOf(clientHelper).mergeMessageMetadata(txn, message.getId(),