From af097dc859b5a72b97a0fd02b940ce31d5e140ac Mon Sep 17 00:00:00 2001 From: ameba23 Date: Wed, 17 Mar 2021 09:23:31 +0100 Subject: [PATCH] add timestamp to shard message metadata --- .../briar/socialbackup/SocialBackupManagerImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/briar-core/src/main/java/org/briarproject/briar/socialbackup/SocialBackupManagerImpl.java b/briar-core/src/main/java/org/briarproject/briar/socialbackup/SocialBackupManagerImpl.java index 6a04a4b32..e8673a60d 100644 --- a/briar-core/src/main/java/org/briarproject/briar/socialbackup/SocialBackupManagerImpl.java +++ b/briar-core/src/main/java/org/briarproject/briar/socialbackup/SocialBackupManagerImpl.java @@ -299,7 +299,8 @@ class SocialBackupManagerImpl extends ConversationClientImpl SHARD.getValue()) { long timestamp = message.getLong(MSG_KEY_TIMESTAMP); boolean isLocal = message.getBoolean(MSG_KEY_LOCAL); - List attachmentHeaders = new ArrayList<>(); + List attachmentHeaders = + new ArrayList<>(); ShardMessageHeader shardHeader = new ShardMessageHeader( messageEntry.getKey(), contactGroupId, timestamp, isLocal, false, true, false, attachmentHeaders); @@ -403,7 +404,9 @@ class SocialBackupManagerImpl extends ConversationClientImpl Message m = clientHelper.createMessage(g, timestamp, body); BdfDictionary meta = BdfDictionary.of( 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); }