matrix-appservice-slack icon indicating copy to clipboard operation
matrix-appservice-slack copied to clipboard

M->S messages get the first newline eaten

Open auscompgeek opened this issue 5 years ago • 5 comments

If I send a multiline Matrix message, the bridged message on Slack is missing the first newline in the message. If there are multiple newlines, only the first disappears.

auscompgeek avatar Dec 22 '19 10:12 auscompgeek

I can't reproduce this but sending a message with only a single line break ends up stripping that line break.

Cadair avatar Sep 28 '20 10:09 Cadair

oh I can repro this, I misread the bug.

Cadair avatar Sep 28 '20 11:09 Cadair

I'm not sure if this is related, but no newlines in slack go through to matrix:

{
  "content": {
    "body": "1\n2\n3",
    "format": "org.matrix.custom.html",
    "formatted_body": "1\n2\n3",
    "msgtype": "m.text"
  },
  "origin_server_ts": ,
  "sender": "@_slack_...",
  "type": "m.room.message",
  "unsigned": {
    "age": 268
  },
  "event_id": "",
  "room_id": ""
}

But everything is on the same line in matrix.

When I send from matrix it of course shows up properly, the message source doesn't look that different. It's \n in both.

{
  "content": {
    "body": "1\n2\n3",
    "msgtype": "m.text"
  },
  "origin_server_ts": ,
  "sender": "@Stephen304:matrix.org",
  "type": "m.room.message",
  "unsigned": {
    "age": 200,
    "transaction_id": ""
  },
  "event_id": "",
  "room_id": ""
}

stephen304 avatar Oct 03 '21 05:10 stephen304

I'm not sure if this is related, but no newlines in slack go through to matrix:

That's #547.

auscompgeek avatar Oct 03 '21 11:10 auscompgeek

(Will be) fixed in https://github.com/matrix-org/matrix-appservice-slack/pull/781

tadzik avatar Apr 04 '24 14:04 tadzik