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

matrix.to links to rooms are bridged only to the room name #1831

Open
progval opened this issue Nov 22, 2024 · 4 comments
Open

matrix.to links to rooms are bridged only to the room name #1831

progval opened this issue Nov 22, 2024 · 4 comments
Labels
T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.

Comments

@progval
Copy link
Contributor

progval commented Nov 22, 2024

These two messages:

{
  "content": {
    "body": "Is the dev of Neostumbler in here?",
    "msgtype": "m.text"
  },
  "origin_server_ts": 1732228008886,
  "sender": "@axiopaladin:matrix.org",
  "type": "m.room.message",
  "event_id": "$L1E8VDrgneiK1CmWNwTgRdHIyHvAl16Imd6vQbJtJ4Q",
  "room_id": "!rgcVclkrrFiLdpQftu:matrix.org"
}

and

{
  "content": {
    "body": "> <@axiopaladin:matrix.org> Is the dev of Neostumbler in here?\n\nFor that there's NeoStumbler ",
    "format": "org.matrix.custom.html",
    "formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!rgcVclkrrFiLdpQftu:matrix.org/$L1E8VDrgneiK1CmWNwTgRdHIyHvAl16Imd6vQbJtJ4Q?via=matrix.teckids.org&via=matrix.org&via=tchncs.de\">In reply to</a> <a href=\"https://matrix.to/#/@axiopaladin:matrix.org\">@axiopaladin:matrix.org</a><br />Is the dev of Neostumbler in here?</blockquote></mx-reply>For that there's <a href=\"https://matrix.to/#/#neostumbler:matrix.org\">#neostumbler:matrix.org</a>",
    "m.relates_to": {
      "m.in_reply_to": {
        "event_id": "$L1E8VDrgneiK1CmWNwTgRdHIyHvAl16Imd6vQbJtJ4Q"
      }
    },
    "msgtype": "m.text"
  },
  "origin_server_ts": 1732228346342,
  "sender": "@pinguin:matrix.teckids.org",
  "type": "m.room.message",
  "event_id": "$H9yC7pOdGJe428SQ2fQc5Rks-hNrdfUBrAUCpTJ8KJo",
  "room_id": "!rgcVclkrrFiLdpQftu:matrix.org"
}

are translated to this on IRC:

22:26:52 <axiopaladin[m]> Is the dev of Neostumbler in here?
22:32:27 <Pinguin[m]> <axiopaladin[m]> "Is the dev of Neostumbler in..." <- For that there's NeoStumbler 

which makes no sense.

The IRC message should contain the matrix.to link.

@tadzik tadzik added the T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems. label Nov 22, 2024
@funderscore1
Copy link

That's a client issue... clients often put things that make no sense in body. As such other Matrix clients relying on body instead of formatted_body are also affected.

@progval
Copy link
Contributor Author

progval commented Nov 22, 2024

The bridge uses the formatted_body so I don't see how the body is relevant.

@funderscore1
Copy link

I'm pretty sure it uses body.

@progval
Copy link
Contributor Author

progval commented Nov 22, 2024

if (event.content.format === "org.matrix.custom.html") {
htmlText = event.content.formatted_body;
}

That's how it manages to send bold/underline/italics/... to IRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.
Projects
None yet
Development

No branches or pull requests

3 participants