mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 04:28:35 +00:00
Fix unable to verify signed group change warning.
This commit is contained in:
@@ -808,7 +808,7 @@ final class GroupManagerV2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private DecryptedGroupChange getDecryptedGroupChange(@Nullable byte[] signedGroupChange) {
|
private DecryptedGroupChange getDecryptedGroupChange(@Nullable byte[] signedGroupChange) {
|
||||||
if (signedGroupChange != null) {
|
if (signedGroupChange != null && signedGroupChange.length > 0) {
|
||||||
GroupsV2Operations.GroupOperations groupOperations = groupsV2Operations.forGroup(GroupSecretParams.deriveFromMasterKey(groupMasterKey));
|
GroupsV2Operations.GroupOperations groupOperations = groupsV2Operations.forGroup(GroupSecretParams.deriveFromMasterKey(groupMasterKey));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -253,8 +253,9 @@ open class MessageContentProcessorV2(private val context: Context) {
|
|||||||
groupV2: SignalServiceProtos.GroupContextV2
|
groupV2: SignalServiceProtos.GroupContextV2
|
||||||
): Boolean {
|
): Boolean {
|
||||||
return try {
|
return try {
|
||||||
val updatedTimestamp = if (groupV2.hasSignedGroupChange) timestamp else timestamp - 1
|
val signedGroupChange: ByteArray? = if (groupV2.hasSignedGroupChange) groupV2.signedGroupChange else null
|
||||||
GroupManager.updateGroupFromServer(context, groupV2.groupMasterKey, groupV2.revision, updatedTimestamp, groupV2.signedGroupChange)
|
val updatedTimestamp = if (signedGroupChange != null) timestamp else timestamp - 1
|
||||||
|
GroupManager.updateGroupFromServer(context, groupV2.groupMasterKey, groupV2.revision, updatedTimestamp, signedGroupChange)
|
||||||
true
|
true
|
||||||
} catch (e: GroupNotAMemberException) {
|
} catch (e: GroupNotAMemberException) {
|
||||||
warn(timestamp, "Ignoring message for a group we're not in")
|
warn(timestamp, "Ignoring message for a group we're not in")
|
||||||
|
|||||||
Reference in New Issue
Block a user