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

Incorrect syntax for user mentions #7629

Open
progval opened this issue Jul 27, 2023 · 3 comments
Open

Incorrect syntax for user mentions #7629

progval opened this issue Jul 27, 2023 · 3 comments
Labels
O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience 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

@progval
Copy link

progval commented Jul 27, 2023

Steps to reproduce

Mention a user from Element iOS nightly. For example: "I DMed tpb about what’s going on but I suspect I’m just talking to a bot/service. 🤔"

Outcome

What did you expect?

This event was sent:

According to the spec:

Something like this should be sent:

{
  "content": {
    "body": "I DMed tpb about what’s going on but I suspect I’m just talking to a bot/service. 🤔",
    "format": "org.matrix.custom.html",
    "formatted_body": "I DMed <a href=\"https://matrix.to/#/@libera_tpb:catircservices.org\">tpb</a> about what’s going on but I suspect I’m just talking to a bot/service. 🤔",
    "msgtype": "m.text"
  },
  ...
}

allowing matrix-appservice-irc to translate it to:


<jevinskie[m]1> I DMed tpb about what’s going on but I suspect I’m just talking to a bot/service. 🤔

What happened instead?

{
  "content": {
    "body": "I DMed [tpb](<https://matrix.to/#/@libera_tpb:catircservices.org>) about what’s going on but I suspect I’m just talking to a bot/service. 🤔",
    "format": "org.matrix.custom.html",
    "formatted_body": "I DMed <a data-mention-type=\"user\" contenteditable=\"false\" href=\"https://matrix.to/#/@libera_tpb:catircservices.org\">tpb</a> about what’s going on but I suspect I’m just talking to a bot/service. 🤔",
    "msgtype": "m.text"
  },
  "origin_server_ts": 1690466951796,
  "room_id": "!LhJjrGmNCUyJajtYYf:catircservices.org",
  "sender": "@jevinskie:matrix.org",
  "type": "m.room.message",
  "unsigned": {
    "age": 4266509
  },
  "event_id": "$30s5H_bel7LYbK_APhXlljW-hXq1bgSiQKjkzeLe-4Q",
  "user_id": "@jevinskie:matrix.org",
  "age": 4266509
}

https://matrix.to/#/!LhJjrGmNCUyJajtYYf:catircservices.org/$30s5H_bel7LYbK_APhXlljW-hXq1bgSiQKjkzeLe-4Q?via=matrix.org&via=catircservices.org

which causes the following to be sent to IRC through matrix-appservice-irc:

<jevinskie[m]1> I DMed [tpb](<https://matrix.to/#/@libera_tpb:catircservices.org>) about what’s going on but I suspect I’m just talking to a bot/service. 🤔

(which then triggers URL snippet fetching, which is very noisy)

Your phone model

No response

Operating system version

No response

Application version

nightly, 1.10.14 (20230621144257)

Homeserver

No response

Will you send logs?

No

@progval progval added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Jul 27, 2023
@jevinskie
Copy link

Here are the message contents. I tried Element X and it doesn't even have the functionality to tap a name to make a mention pill. And indeed I'm on 1.10.14 (20230621144257) from TestFlight.

https://gist.github.com/jevinskie/19fd0fbd7903e1586b5e8b8c6f8cd3a5

@jevinskie
Copy link

OK so changing mode: .markdown to mode: .displayname here makes the Markdown that doesn't render in IRC clients go away and also fixes the "bot sees a link" issue. Unfortunately it doesn't display a pill in Element anymore.

View from Element
View from IRC

@Velin92 Velin92 added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience labels Jul 28, 2023
@Velin92 Velin92 added S-Major Severely degrades major functionality or product features, with no satisfactory workaround and removed S-Minor Impairs non-critical functionality or suitable workarounds exist labels Jul 28, 2023
@whitequark
Copy link

Thank you for triaging as "Major".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience 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

No branches or pull requests

4 participants