mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Fix bad assumption about attachment count in validator.
This commit is contained in:
@@ -97,7 +97,7 @@ object SignalServiceProtoUtil {
|
||||
val DataMessage.isInvalid: Boolean
|
||||
get() {
|
||||
if (isViewOnce == true) {
|
||||
val contentType = attachments[0].contentType?.lowercase()
|
||||
val contentType = attachments.getOrNull(0)?.contentType?.lowercase()
|
||||
return attachments.size != 1 || !MediaUtil.isImageOrVideoType(contentType)
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user