mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01: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