diff --git a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/navigation/destinations/AttachmentDestination.kt b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/navigation/destinations/AttachmentDestination.kt index c9fd9e15e1e..2099f570c98 100644 --- a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/navigation/destinations/AttachmentDestination.kt +++ b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/navigation/destinations/AttachmentDestination.kt @@ -87,11 +87,13 @@ public open class AttachmentDestination( if (url.isNullOrEmpty()) { logger.e { "Wrong URL for attachment. Attachment: $attachment" } - Toast.makeText( - context, - context.getString(R.string.stream_ui_message_list_attachment_invalid_url), - Toast.LENGTH_SHORT, - ).show() + if (attachment.type == AttachmentType.UNKNOWN) { + Toast.makeText( + context, + context.getString(R.string.stream_ui_message_list_attachment_invalid_url), + Toast.LENGTH_SHORT, + ).show() + } return }