matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
461 stars 149 forks source link

Bridge short lists as a single line on IRC #1668

Open progval opened 1 year ago

progval commented 1 year ago

For example, the following message:

{
  "content": {
    "body": "> <@neoson:matrix.org> Is there a place to get help for setting up IRC connection?\n\nYou mean: \n1. You want to connect to an IRC channel? \n2. Do you want your Matrix room connected to an IRC channel?\n3. Setup a Matrix IRC bridge?\n4. None of the above?",
    "format": "org.matrix.custom.html",
    "formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!OGEhHVWSdvArJzumhm:matrix.org/$zBCwHJz-FZVR_xOXURS8oVECtZ2cDwEgnRinc0uBhyI?via=matrix.org&via=libera.chat&via=wolfo.tech\">In reply to</a> <a href=\"https://matrix.to/#/@neoson:matrix.org\">@neoson:matrix.org</a><br>Is there a place to get help for setting up IRC connection?</blockquote></mx-reply><p>You mean:</p>\n<ol>\n<li>You want to connect to an IRC channel?</li>\n<li>Do you want your Matrix room connected to an IRC channel?</li>\n<li>Setup a Matrix IRC bridge?</li>\n<li>None of the above?</li>\n</ol>\n",
    "m.relates_to": {
      "m.in_reply_to": {
        "event_id": "$zBCwHJz-FZVR_xOXURS8oVECtZ2cDwEgnRinc0uBhyI"
      }
    },
    "msgtype": "m.text"
  },
  "origin_server_ts": 1677357832567,
  "sender": "@forevernoob:matrix.org",
  "type": "m.room.message",
  "unsigned": {
    "age": 10844
  },
  "event_id": "$S6hiMJqbup66buWyq30SPRAeTI40p1ZtklVgBRpmywo",
  "room_id": "!OGEhHVWSdvArJzumhm:matrix.org"
}

was bridged as:

20:44:03 <ForeverNoob[m]> <neoson[m]> "Is there a place to get help for..." <- You mean:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/9b14d54987140f38478acc8e7ca36f027aceb7f7>)

the content of the paste being:

<neoson[m]> "Is there a place to get help for..." <- You mean: 
1. You want to connect to an IRC channel? 
2. Do you want your Matrix room connected to an IRC channel?
3. Setup a Matrix IRC bridge?
4. None of the above?

Instead, it would be much more natural to send this to IRC:

<nick> You mean: 1. You want to connect to an IRC channel?  2. Do you want your Matrix room connected to an IRC channel? 3. Setup a Matrix IRC bridge? 4. None of the above?