add isLocal boolean to shard message headers

This commit is contained in:
ameba23
2021-03-17 09:17:36 +01:00
parent 0658e90c65
commit 3adc6d002c

View File

@@ -292,16 +292,17 @@ class SocialBackupManagerImpl extends ConversationClientImpl
.getMessageMetadataAsDictionary(txn, contactGroupId); .getMessageMetadataAsDictionary(txn, contactGroupId);
List<ConversationMessageHeader> headers = List<ConversationMessageHeader> headers =
new ArrayList<>(); new ArrayList<>();
List<AttachmentHeader> attachmentHeaders = new ArrayList<>();
for (Entry<MessageId, BdfDictionary> messageEntry : messages for (Entry<MessageId, BdfDictionary> messageEntry : messages
.entrySet()) { .entrySet()) {
BdfDictionary message = messageEntry.getValue(); BdfDictionary message = messageEntry.getValue();
if (message.getLong(MSG_KEY_MESSAGE_TYPE).intValue() == if (message.getLong(MSG_KEY_MESSAGE_TYPE).intValue() ==
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);
List<AttachmentHeader> attachmentHeaders = new ArrayList<>();
ShardMessageHeader shardHeader = new ShardMessageHeader( ShardMessageHeader shardHeader = new ShardMessageHeader(
messageEntry.getKey(), contactGroupId, timestamp, messageEntry.getKey(), contactGroupId, timestamp,
false, false, false, false, attachmentHeaders); isLocal, false, true, false, attachmentHeaders);
headers.add(shardHeader); headers.add(shardHeader);
} }
} }