mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 19:56:00 +00:00
Fix crash when receiving GSE before state membership updated.
This commit is contained in:
@@ -325,7 +325,7 @@ class GroupsV2StateProcessor private constructor(
|
||||
if (updatedGroupState == null || updatedGroupState == remoteGroupStateDiff.previousGroupState) {
|
||||
Log.i(TAG, "$logPrefix Local state is at or later than server revision: ${currentLocalState?.revision ?: "null"}")
|
||||
|
||||
if (currentLocalState != null) {
|
||||
if (currentLocalState != null && applyGroupStateDiffResult.remainingRemoteGroupChanges.isEmpty()) {
|
||||
val endorsements = groupOperations.receiveGroupSendEndorsements(serviceIds.aci, currentLocalState, remoteGroupStateDiff.groupSendEndorsementsResponse)
|
||||
|
||||
if (endorsements != null) {
|
||||
|
||||
@@ -1057,6 +1057,11 @@ public final class GroupsV2Operations {
|
||||
|
||||
List<ACI> members = decryptedGroup.members.stream().map(m -> ACI.parseOrThrow(m.aciBytes)).collect(Collectors.toList());
|
||||
|
||||
if (!members.contains(selfAci)) {
|
||||
Log.w(TAG, "Attempting to receive endorsements for group state we aren't in, aborting");
|
||||
return null;
|
||||
}
|
||||
|
||||
GroupSendEndorsementsResponse.ReceivedEndorsements endorsements = null;
|
||||
try {
|
||||
endorsements = groupSendEndorsementsResponse.receive(
|
||||
|
||||
Reference in New Issue
Block a user