emojis: properly handle inline emojis on local

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2025-03-04 11:27:09 -07:00
parent ebc1aa05b1
commit dcc8689835
6 changed files with 30 additions and 34 deletions
+3 -3
View File
@@ -69,12 +69,12 @@ func (s Style) Format(message string) string {
}
return fmt.Sprintf(`<a href='%s'>%s</a>`, s.URL, message)
case StyleCustomEmoji:
if s.Emoji != "" {
return s.Emoji
if s.EmojiInfo.Emoji != "" {
return s.EmojiInfo.Emoji
} else {
return fmt.Sprintf(
`<img data-mx-emoticon data-mau-animated-emoji src="%s" height="32" width="32" alt="%s" title="%s"/>`,
s.EmojiURI, message, message,
s.EmojiInfo.EmojiURI, message, message,
)
}
case StyleBotCommand: