mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 12:17:22 +00:00
Fix issue where group leave failed to send in announcement group.
This commit is contained in:
committed by
Alex Hart
parent
08008629b3
commit
7c134a6c9d
@@ -173,12 +173,6 @@ public final class PushGroupSendJob extends PushSendJob {
|
||||
throw new MmsException("No GV1 messages can be sent anymore!");
|
||||
}
|
||||
|
||||
Optional<GroupDatabase.GroupRecord> groupRecord = DatabaseFactory.getGroupDatabase(context).getGroup(groupRecipient.requireGroupId());
|
||||
|
||||
if (groupRecord.isPresent() && groupRecord.get().isAnnouncementGroup() && !groupRecord.get().isAdmin(Recipient.self())) {
|
||||
throw new MmsException("Non-admins cannot send messages in announcement groups!");
|
||||
}
|
||||
|
||||
try {
|
||||
log(TAG, String.valueOf(message.getSentTimeMillis()), "Sending message: " + messageId + ", Recipient: " + message.getRecipient().getId() + ", Thread: " + threadId + ", Attachments: " + buildAttachmentString(message.getAttachments()));
|
||||
|
||||
@@ -327,6 +321,12 @@ public final class PushGroupSendJob extends PushSendJob {
|
||||
throw new UndeliverableMessageException("Messages can no longer be sent to V1 groups!");
|
||||
}
|
||||
} else {
|
||||
Optional<GroupDatabase.GroupRecord> groupRecord = DatabaseFactory.getGroupDatabase(context).getGroup(groupRecipient.requireGroupId());
|
||||
|
||||
if (groupRecord.isPresent() && groupRecord.get().isAnnouncementGroup() && !groupRecord.get().isAdmin(Recipient.self())) {
|
||||
throw new UndeliverableMessageException("Non-admins cannot send messages in announcement groups!");
|
||||
}
|
||||
|
||||
SignalServiceDataMessage.Builder builder = SignalServiceDataMessage.newBuilder()
|
||||
.withTimestamp(message.getSentTimeMillis());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user