feat(Message): fallback to import message content if necessary
Messages are parsed to transform markdown to something that can be rendered in a formatted way. When this happens, the parsed text is applied to a message's `text` property inside desktop. There was no formatted message support for imported discord messages, so we were relying purely on `discordMessage.content`. However, now formatting support is pending in status-go here: https://github.com/status-im/status-go/pull/2933 This means, once this lands, we can simply rely on `messsageItem.text`. I'm adding this guard here such that this will continue to work without the feature in status-go, but once the feature in status-go lands, desktop will automatically adapt. Closes #8086
This commit is contained in:
parent
234a164597
commit
b9a9f2a20f
|
@ -133,6 +133,7 @@ proc initItem*(
|
|||
result.messageAttachments = @[]
|
||||
|
||||
if ContentType.DiscordMessage == contentType:
|
||||
if result.messageText == "":
|
||||
result.messageText = discordMessage.content
|
||||
result.senderId = discordMessage.author.id
|
||||
result.senderDisplayName = discordMessage.author.name
|
||||
|
|
Loading…
Reference in New Issue