fix(os-notifications): Add Image text to notifications with image without a text

Fixes: #10162
This commit is contained in:
Boris Melnik 2023-04-11 15:19:52 +03:00
parent 8c874a90d2
commit 5a5ade5ccd

View File

@ -929,7 +929,9 @@ method onNewMessagesReceived*(self: Module, sectionIdMsgBelongsTo: string, chatI
let contactDetails = self.controller.getContactDetails(message.`from`)
let communityChats = self.controller.getCommunityById(chatDetails.communityId).chats
let renderedMessageText = self.controller.getRenderedText(message.parsedText, communityChats)
let plainText = singletonInstance.utils.plainText(renderedMessageText)
var plainText = singletonInstance.utils.plainText(renderedMessageText)
if ContentType(message.contentType) == ContentType.Image and len(plainText) == 0:
plainText = "🖼️"
var notificationTitle = contactDetails.defaultDisplayName
case chatDetails.chatType: