Support displaying shortcodes instead of Emojis in messages #222
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The font in my terminal doesn't support most emoji characters and shows ugly placeholders instead. For reactions, there is the setting
reaction_shortcode_display
that allows me to see human-readable shortcodes instead of the emojis. However, for emojis in messages there is no such feature.I added a new setting
message_shortcode_display
that controls whether shortcodes are displayed instead of emojis in messages.Replacing emojis with shortcodes happens in
TextPrinter
(or, for plain text, inMessage::show_msg()
).I hope the changes are alright. I'd be happy to improve the code further and I'd be grateful for some feedback as I'm not very experienced in Rust yet.