mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-14 23:18:43 +00:00
Fix group updates from others showing before messages made before the update.
This commit is contained in:
committed by
Michelle Tang
parent
611b52780e
commit
dd396eb75a
@@ -648,7 +648,11 @@ class GroupsV2StateProcessor private constructor(
|
||||
}
|
||||
|
||||
else -> {
|
||||
storeMessage(GroupProtoUtil.createDecryptedGroupV2Context(masterKey, GroupMutation(runningGroupState, entry.change, entry.group), null), runningTimestamp, serverGuid)
|
||||
storeMessage(
|
||||
decryptedGroupV2Context = GroupProtoUtil.createDecryptedGroupV2Context(masterKey, GroupMutation(runningGroupState, entry.change, entry.group), null),
|
||||
timestamp = runningTimestamp,
|
||||
serverGuid = serverGuid
|
||||
)
|
||||
runningTimestamp++
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ open class MessageContentProcessor(private val context: Context) {
|
||||
): GroupUpdateResult? {
|
||||
return try {
|
||||
val signedGroupChange: ByteArray? = if (groupV2.hasSignedGroupChange) groupV2.signedGroupChange else null
|
||||
val updatedTimestamp = if (signedGroupChange != null) timestamp else timestamp - 1
|
||||
val updatedTimestamp = if (signedGroupChange != null) timestamp else timestamp + 1
|
||||
if (groupV2.revision != null) {
|
||||
GroupManager.updateGroupFromServer(context, groupV2.groupMasterKey, localRecord, groupSecretParams, groupV2.revision!!, updatedTimestamp, signedGroupChange, serverGuid)
|
||||
} else {
|
||||
|
||||
@@ -106,7 +106,7 @@ class IncomingMessage(
|
||||
return IncomingMessage(
|
||||
from = from,
|
||||
sentTimeMillis = timestamp,
|
||||
receivedTimeMillis = timestamp,
|
||||
receivedTimeMillis = System.currentTimeMillis(),
|
||||
serverTimeMillis = timestamp,
|
||||
serverGuid = serverGuid,
|
||||
groupId = groupId,
|
||||
|
||||
Reference in New Issue
Block a user