From 6adb809ba038b7b61d4b23cd7d69820881e2102b Mon Sep 17 00:00:00 2001 From: Boris Melnik Date: Thu, 23 Jun 2022 14:33:13 +0300 Subject: [PATCH] fix(backend): Add some text to image message Closes: #6094 --- src/app/modules/shared_models/message_item.nim | 2 +- src/backend/chat.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/modules/shared_models/message_item.nim b/src/app/modules/shared_models/message_item.nim index 3b6eb711d1..852f2163be 100644 --- a/src/app/modules/shared_models/message_item.nim +++ b/src/app/modules/shared_models/message_item.nim @@ -72,7 +72,7 @@ proc initItem*( result.senderIcon = senderIcon result.seen = seen result.outgoingStatus = outgoingStatus - result.messageText = text + result.messageText = if ContentType.Image == contentType: "" else: text result.messageImage = image result.messageContainsMentions = messageContainsMentions result.timestamp = timestamp diff --git a/src/backend/chat.nim b/src/backend/chat.nim index e0503637b6..4dbb253ff0 100644 --- a/src/backend/chat.nim +++ b/src/backend/chat.nim @@ -87,7 +87,7 @@ proc sendImages*(chatId: string, images: var seq[string]): RpcResponse[JsonNode] "imagePath": image, # TODO is this still needed # "ensName": preferredUsername, - "text": "" + "text": "Please upgrade your status version to view images" } ) callPrivateRPC("sendChatMessages".prefix, %* [imagesJson])