Unverified Commit 3fffb4ba authored by Filipe de Lima Brito's avatar Filipe de Lima Brito Committed by GitHub

Merge pull request #1927 from wackieju/develop

[NEW] Adding GIF playback
parents 03a40799 6add5d42
......@@ -127,7 +127,12 @@ class UiModelMapper @Inject constructor(
getChatRoomAsync(message.roomId)?.let { chatRoom ->
message.urls?.forEach { url ->
mapUrl(message, url, chatRoom)?.let { list.add(it) }
if (url.url.endsWith(".gif")) {
val attachment = Attachment(imageUrl = url.url)
mapAttachment(message, attachment, chatRoom)?.let { list.add(it) }
} else {
mapUrl(message, url, chatRoom)?.let { list.add(it) }
}
}
message.attachments?.mapNotNull { attachment ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment