fix(os-notifications): Display image emoji for sticker in notification

Fixes: #10294
This commit is contained in:
Boris Melnik 2023-04-24 14:02:28 +03:00
parent 10b8d38844
commit dc1f407fd1
1 changed files with 1 additions and 1 deletions

View File

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