mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +01:00
pass MessageStatus information to shard message headers (sent and seen)
This commit is contained in:
@@ -33,6 +33,7 @@ import org.briarproject.bramble.api.sync.Group.Visibility;
|
|||||||
import org.briarproject.bramble.api.sync.GroupId;
|
import org.briarproject.bramble.api.sync.GroupId;
|
||||||
import org.briarproject.bramble.api.sync.Message;
|
import org.briarproject.bramble.api.sync.Message;
|
||||||
import org.briarproject.bramble.api.sync.MessageId;
|
import org.briarproject.bramble.api.sync.MessageId;
|
||||||
|
import org.briarproject.bramble.api.sync.MessageStatus;
|
||||||
import org.briarproject.bramble.api.system.Clock;
|
import org.briarproject.bramble.api.system.Clock;
|
||||||
import org.briarproject.bramble.api.versioning.ClientVersioningManager;
|
import org.briarproject.bramble.api.versioning.ClientVersioningManager;
|
||||||
import org.briarproject.bramble.api.versioning.ClientVersioningManager.ClientVersioningHook;
|
import org.briarproject.bramble.api.versioning.ClientVersioningManager.ClientVersioningHook;
|
||||||
@@ -298,6 +299,8 @@ class SocialBackupManagerImpl extends ConversationClientImpl
|
|||||||
if (meta.getLong(MSG_KEY_MESSAGE_TYPE).intValue() ==
|
if (meta.getLong(MSG_KEY_MESSAGE_TYPE).intValue() ==
|
||||||
SHARD.getValue()) {
|
SHARD.getValue()) {
|
||||||
boolean isLocal = meta.getBoolean(MSG_KEY_LOCAL);
|
boolean isLocal = meta.getBoolean(MSG_KEY_LOCAL);
|
||||||
|
|
||||||
|
MessageStatus status = db.getMessageStatus(txn, contactId, messageEntry.getKey());
|
||||||
long timestamp;
|
long timestamp;
|
||||||
if (isLocal) {
|
if (isLocal) {
|
||||||
timestamp = meta.getLong(MSG_KEY_TIMESTAMP);
|
timestamp = meta.getLong(MSG_KEY_TIMESTAMP);
|
||||||
@@ -310,7 +313,7 @@ class SocialBackupManagerImpl extends ConversationClientImpl
|
|||||||
new ArrayList<>();
|
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, status.isSent(), status.isSeen(), attachmentHeaders);
|
||||||
headers.add(shardHeader);
|
headers.add(shardHeader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user