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

@room pills don't render correctly when sent using Markdown input #2966

Closed
frebib opened this issue Jun 3, 2024 · 4 comments · Fixed by #3193
Closed

@room pills don't render correctly when sent using Markdown input #2966

frebib opened this issue Jun 3, 2024 · 4 comments · Fixed by #3193
Assignees
Labels
A-Composer A-Event Rendering How events are shown in the timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@frebib
Copy link
Contributor

frebib commented Jun 3, 2024

Steps to reproduce

  1. Use the non-RTE input field and send an @room mention
  2. Note that the event doesn't send a formatted body, nor does the message bubble render the @room as a pill

Outcome

What did you expect?

@room to render as a pill

What happened instead?

It rendered as plain text

Your phone model

No response

Operating system version

No response

Application version and app store

No response

Homeserver

No response

Will you send logs?

No

Are you willing to provide a PR?

No

@frebib frebib added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Jun 3, 2024
@bmarty
Copy link
Member

bmarty commented Jun 26, 2024

Without formating, this event is sent:

  "content": {
    "body": "@room Test",
    "m.mentions": {
      "room": true
    },
    "msgtype": "m.text"
  },

and with formatting:

  "content": {
    "body": "@room test 2",
    "format": "org.matrix.custom.html",
    "formatted_body": "@room test 2",
    "m.mentions": {},
    "msgtype": "m.text"
  },

and this is how this render on Web:

image

and on EXA this is the opposite:

image

Also this line is crashing in debug build, since mentionSpan.rawValue is equal to @room and this is not a valid userId.

We have several problems to fix, not only a rendering problem.

@bmarty bmarty added S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely A-Composer A-Event Rendering How events are shown in the timeline labels Jun 26, 2024
@jmartinesp jmartinesp self-assigned this Jul 12, 2024
@frebib
Copy link
Contributor Author

frebib commented Jul 15, 2024

Intentional mentions are working now, but the markdown input is still not sending a formatted body, so the room pill still doesn't render as a pill. EW does render a pill even without a formatted_body though. Not sure what the intention is here

  "content": {
    "msgtype": "m.text",
    "body": "@room ",
    "m.mentions": {
      "room": true
    }
  },

@jmartinesp
Copy link
Member

Intentional mentions are working now, but the markdown input is still not sending a formatted body, so the room pill still doesn't render as a pill.

Oh, true. I did all my tests with messages with both an @room mention and a explicit one so they were always formatted and I never found this issue. Let me check if I can fix this remaining case.

@jmartinesp
Copy link
Member

This should now be fixed with #3201.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Composer A-Event Rendering How events are shown in the timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants