Update announcement checks.

This commit is contained in:
Michelle Tang 2026-06-09 12:18:22 -04:00 committed by Cody Henthorne
parent 4bc11fcf0d
commit 6d260ab63d
2 changed files with 7 additions and 1 deletions

View File

@ -279,6 +279,11 @@ open class MessageContentProcessor(private val context: Context) {
Log.w(TAG, "Ignoring message from ${senderRecipient.id} because it has disallowed content, and they're not an admin in an announcement-only group.")
return Gv2PreProcessResult.IGNORE
}
} else if (content.editMessage?.dataMessage != null) {
if (content.editMessage!!.dataMessage!!.hasDisallowedAnnouncementOnlyContent) {
Log.w(TAG, "Ignoring edit message from ${senderRecipient.id} because it has disallowed content, and they're not an admin in an announcement-only group.")
return Gv2PreProcessResult.IGNORE
}
} else if (content.typingMessage != null) {
Log.w(TAG, "Ignoring typing indicator from ${senderRecipient.id} because they're not an admin in an announcement-only group.")
return Gv2PreProcessResult.IGNORE

View File

@ -67,7 +67,8 @@ object SignalServiceProtoUtil {
quote != null ||
preview.isNotEmpty() ||
bodyRanges.isNotEmpty() ||
sticker != null
sticker != null ||
pollCreate != null
}
val DataMessage.isExpirationUpdate: Boolean