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

HTMLDisable for Matrix adds empty format and formatted_body fields #1382

Closed
bkil opened this issue Jan 31, 2021 · 0 comments
Closed

HTMLDisable for Matrix adds empty format and formatted_body fields #1382

bkil opened this issue Jan 31, 2021 · 0 comments

Comments

@bkil
Copy link

bkil commented Jan 31, 2021

Describe the bug
If we enable HTMLDisable, messages will not be visible for the miniVector Android Matrix client. Upon closer inspection of the event JSON, the text message is encapsulated in body, but the pruned format and formatted_body fields are not removed, they are included with an empty string value.

To Reproduce
Steps to reproduce the behavior:

  • Set up a bridge between Matrix and something else (like IRC)
  • Join the Matrix room using miniVector (may also affect other clients)
  • Enable HTMDisable on the matrix gateway
  • Send a message from IRC
  • Observe that miniVector shows a message without text, can also be verified when clicking ... -> View Source on the message in Element Web

Expected behavior
If we disable HTML formatting, the fields format and formatted_body should be removed completely.

Environment (please complete the following information):

  • OS: Linux
  • Matterbridge version: 1.21.0 cf13fff

Additional context

[irc.myirc]
Server="chat.freenode.net:6697"
Nick="nick"
UseTLS=true

[matrix.mymatrix]
Server="https://matrix.org"
Login="nick"
Password="password"
HTMLDisable=true #### ####

[[gateway]]
name="gateway1"
enable=true

[[gateway.inout]]
account="irc.myirc"
channel="#htmldisabletest"

[[gateway.inout]]
account="matrix.mymatrix"
channel="#htmldisabletest:matrix.org"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants