mautrix / slack

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

Accurately represent Matrix messages containing newlines in Slack #61

Closed redgoat650 closed 2 months ago

redgoat650 commented 2 months ago

Newlines don't seem to be replicated correctly in slack when sent from matrix as text.

Set the PreserveWhitespace field in the format Context to preserve newlines as expected. Without this field, all "\n"s are stripped from the text during parsing, resulting in some odd-looking messages in slack.

Before: (matrix) newline-matrix-before (slack) newline-slack-before

After: (matrix) newline-matrix-after (slack) newline-slack-after

redgoat650 commented 2 months ago

I wonder why nobody else complained 🤔

Yeah great question, I was wondering the same. My team happens to be doing the "ramp-up" thing right now, keeping an eye open for discrepancies like this. Perhaps other established teams either haven't upgraded (I suspect this was a regression that occurred with this refactor 2mo ago), or it didn't garner enough attention in their regular chat workflows to investigate yet 🤷

niebloomj commented 2 months ago

I thought I was the only one and didn't want to seem annoying so I didn't complain haha. Thanks for fixing this!! (It think I have had this issue for the last 6 months)