weechat-matrix-protocol-script
weechat-matrix-protocol-script copied to clipboard
Properly send messages containing markdown formatting
When writing a message containing e.g. backticks or other markdown stuff using the Vector client it's rendered properly. When sending the same message through the weechat plugin it's not.
It seems to be up to the client to do this, but I think it would be a nice feature - not having it makes it pretty ugly for others to receive messages sent from weechat.
// from weecha
"content": {
"body": "test `from weechat`",
"msgtype": "m.text"
}
// from vector
"content": {
"msgtype": "m.text",
"format": "org.matrix.custom.html",
"body": "test `from vector`",
"formatted_body": "test <code>from vector</code>"
},
This is a very complicated feature, which isn't properly documented in the protocol. Vector devs are cheating and just inventing their own rules for what's allowed html and not and such, and it's not documented anywhere in the protocol. (AFAIK). I think I will wait until rich text has been firmly settled before tackling this I think.
For just sending <code> I would be willing to accept a patch to do that as I can see the usefulness, but I'm hesitant to start work on it myself.