Prevent remote delete in gv1 crash.

This commit is contained in:
Cody Henthorne
2025-03-03 11:21:18 -05:00
committed by Greyson Parrelli
parent 9c473fb570
commit 94b50f1502
2 changed files with 9 additions and 0 deletions

View File

@@ -118,6 +118,10 @@ public final class PushGroupSendJob extends PushSendJob {
throw new AssertionError("Not a group!");
}
if (group.isPushV1Group()) {
throw new MmsException("Cannot send to GV1 groups");
}
MessageTable database = SignalDatabase.messages();
OutgoingMessage message = database.getOutgoingMessage(messageId);

View File

@@ -146,6 +146,11 @@ public class RemoteDeleteSendJob extends BaseJob {
return;
}
if (conversationRecipient.isPushV1Group()) {
Log.w(TAG, "Unable to remote delete messages in GV1 groups");
return;
}
List<Recipient> possible = Stream.of(recipients).map(Recipient::resolved).toList();
List<Recipient> eligible = RecipientUtil.getEligibleForSending(Stream.of(recipients).map(Recipient::resolved).toList());
List<RecipientId> skipped = Stream.of(SetUtil.difference(possible, eligible)).map(Recipient::getId).toList();