mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 14:19:53 +01:00
add timestamp to shard message metadata
This commit is contained in:
@@ -299,7 +299,8 @@ class SocialBackupManagerImpl extends ConversationClientImpl
|
|||||||
SHARD.getValue()) {
|
SHARD.getValue()) {
|
||||||
long timestamp = message.getLong(MSG_KEY_TIMESTAMP);
|
long timestamp = message.getLong(MSG_KEY_TIMESTAMP);
|
||||||
boolean isLocal = message.getBoolean(MSG_KEY_LOCAL);
|
boolean isLocal = message.getBoolean(MSG_KEY_LOCAL);
|
||||||
List<AttachmentHeader> attachmentHeaders = new ArrayList<>();
|
List<AttachmentHeader> attachmentHeaders =
|
||||||
|
new ArrayList<>();
|
||||||
ShardMessageHeader shardHeader = new ShardMessageHeader(
|
ShardMessageHeader shardHeader = new ShardMessageHeader(
|
||||||
messageEntry.getKey(), contactGroupId, timestamp,
|
messageEntry.getKey(), contactGroupId, timestamp,
|
||||||
isLocal, false, true, false, attachmentHeaders);
|
isLocal, false, true, false, attachmentHeaders);
|
||||||
@@ -403,7 +404,9 @@ class SocialBackupManagerImpl extends ConversationClientImpl
|
|||||||
Message m = clientHelper.createMessage(g, timestamp, body);
|
Message m = clientHelper.createMessage(g, timestamp, body);
|
||||||
BdfDictionary meta = BdfDictionary.of(
|
BdfDictionary meta = BdfDictionary.of(
|
||||||
new BdfEntry(MSG_KEY_MESSAGE_TYPE, SHARD.getValue()),
|
new BdfEntry(MSG_KEY_MESSAGE_TYPE, SHARD.getValue()),
|
||||||
new BdfEntry(MSG_KEY_LOCAL, true));
|
new BdfEntry(MSG_KEY_LOCAL, true),
|
||||||
|
new BdfEntry(MSG_KEY_TIMESTAMP, timestamp)
|
||||||
|
);
|
||||||
clientHelper.addLocalMessage(txn, m, meta, true, false);
|
clientHelper.addLocalMessage(txn, m, meta, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user