Bug 458993

Summary: NeoChat not showing custom emoji text in inline code
Product: [Applications] NeoChat Reporter: Jan Bidler <janbidler00>
Component: GeneralAssignee: Tobias Fella <fella>
Status: RESOLVED FIXED    
Severity: normal CC: carl
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jan Bidler 2022-09-11 11:47:08 UTC
SUMMARY
If you send the name of a custom emoji text in inline code, NeoChat won't display it properly and seems to still try to send a custom emoji, rather than just sending it as text


STEPS TO REPRODUCE
1. Create a custom emoji (I choose "frogge" as a name, picture is irrelevant)
2. Open a room, and send the custom emoji name in inline code (so QUOTE `:frogge:` UNQUOTE)

OBSERVED RESULT
NeoChat shows an empty message, and looking at the json source, it tries to send the custom emoji inside the codeblock (
`formatted_body": "<code<img data-mx-emoticon=\"\" src=\"mxc://matrix.org/TjfamcAphPtMsVoqyUIghhHV\" alt=\":frogge:\" title=\":frogge:\" height=\"32\" vertical-align=\"middle\" /></code>"`)

EXPECTED RESULT
NeoChat should show the name of the emoji in the inline code blocks, and the json source should be the emoji name, rather than the full custom emoji (so show QUOTE `:frogge:` UNQUOTE with `"formatted_body": "<code>:frogge:</code>"`)

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
NeoChat: self compiled flatpak
Comment 1 Bug Janitor Service 2022-11-17 20:39:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/633
Comment 2 Tobias Fella 2022-11-25 22:27:36 UTC
Git commit 2920247ab40a9029230e083697ccc162c13d94a7 by Tobias Fella.
Committed on 25/11/2022 at 22:27.
Pushed by tfella into branch 'master'.

Don't render custom emojis in code blocks

M  +2    -2    src/actionshandler.cpp
M  +13   -6    src/customemojimodel.cpp

https://invent.kde.org/network/neochat/commit/2920247ab40a9029230e083697ccc162c13d94a7