mautrix / slack

A Matrix-Slack puppeting bridge
GNU Affero General Public License v3.0
68 stars 19 forks source link

Newlines missing on Matrix for Slack formatted messages without blocks #25

Closed twouters closed 8 months ago

twouters commented 1 year ago

The following message from Slack doesn't properly render newlines in Element. (Might be an issue with this client and not for other clients but I suppose compatibility is somewhat expected.)

{
  "type": "m.room.message",
  "sender": "@twouters:matrix.tcpdump.be",
  "content": {
    "body": "**bold** line 1_italic_ line 2line 3",
    "fi.mau.double_puppet_source": "mautrix-slack",
    "format": "org.matrix.custom.html",
    "formatted_body": "<b>bold</b> line 1\n<i>italic</i> line 2\nline 3",
    "msgtype": "m.text"
  },
  "origin_server_ts": 1681735582179,
  "unsigned": {
    "age": 133
  },
  "event_id": "$OYl0mLzdvF5YInrKJlhfm_T3qu-DxwcS_LsmYXXXXXX",
  "room_id": "!ftBtKtxVHpQhXXXXXX:matrix.tcpdump.be"
}
tulir commented 8 months ago

In my experience it was missing for Slack messages formatted with blocks, which is now fixed, but let me know if not (with the exact method to send the message on slack)