Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lack of /me rendering in quotes #1399

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Epicalert
Copy link

Fixes #1390

adb2b58:

2023-03-23_01-18

This PR:
2023-03-23_01-21

@dvn0
Copy link

dvn0 commented Apr 2, 2023

LGTM

@@ -29,6 +29,10 @@ namespace Dino.Ui.Quote {
if (content_item.type_ == MessageItem.TYPE) {
var message = ((MessageItem) content_item).message;
this.message = Dino.message_body_without_reply_fallback(message);

if (message.body.has_prefix("/me ")) {
this.message = @"<i><b>$(Markup.escape_text(display_name))</b> " + this.message.substring(4) + "</i>";
Copy link
Member

@fiaxh Oct 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the label now uses markup, you have to escape every string that you don't want to contain markup. That means, also the message. Otherwise, the message /me <b>test</b> would be displayed with a bold "test" instead of the actual message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

/me doesn't get displayed when coupled to a reply
3 participants