kopia lustrzana https://github.com/ryukoposting/Signal-Android
Add a failsafe to prevent non-admin sends in announcement groups.
rodzic
8c3a0c1f9f
commit
ba4d1c9844
|
@ -173,6 +173,12 @@ 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()));
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue