42wim/matterircd

Problems in combination with matterbridge

stefanct opened this issue · 2 comments

We are using matterbridge (1.25.0) to relay between a mattermost and a pantalaimon (matrix) instance, respectively.
This works mostly fine but there are two issues I have recognized so far that I think are due to matterbridge's format of certain messages. They aren't a big issue within mattermost itself but become more annoying when further relayed to matterircd users. (We are using matterircd 0.24.2 2a879fb btw if that matters).

The first one is with embedded images. When posted by someone behind the matterbridge, they are displayed like this:

image

The problem here is that in IRC the user name and the image URL are separate messages because the nickname is similar to a message associated with the picture, which is also printed as its own message by matterircd:

image

It would be much better if the message and the download url would be printed together in one line. That way the IRC client could easily massage the message into something that looks more native (I am doing so in hexchat with this plugin for normal text messages).

The second thing is replies with quotes.
Similarly to the image problem, when replying to a message, the nickname ends up on its own line in IRC. However, in that case it is even worse as the line is posted after the actual message. This might be an additional bug though, I presume.

image

image

This works fine if the reply does not come via the bridge but directly from MM. So maybe some of above could be considered matterbridge bugs instead of a matterircd problems but it might not be easily fixable there and the issues are way more apparent in IRC.

The first one is with embedded images. When posted by someone behind the matterbridge, they are displayed like this:

...

The problem here is that in IRC the user name and the image URL are separate messages because the nickname is similar to a message associated with the picture, which is also printed as its own message by matterircd:

....

It would be much better if the message and the download url would be printed together in one line. That way the IRC client could easily massage the message into something that looks more native (I am doing so in hexchat with this plugin for normal text messages).

That would be this bit of code - https://github.com/42wim/matterircd/blob/master/mm-go-irckit/userbridge.go#L713 & https://github.com/42wim/matterircd/blob/master/mm-go-irckit/userbridge.go#L737

The thing is, a single post can have multiple files attached. The code displays the message associated with that post first then for each file attached, displays the link. So e.g of a post with two attachments.

|20:01 <hloeung> Testing [fqc8…]
|20:01 <hloeung> download file - https://chat..../api/v4/files/hrqbnm4ysi8xpqy78ns4imbuao [fqc8…]
|20:01 <hloeung> download file - https://chat..../api/v4/files/uk4dw8476jg7mmk8e14g4hkfja [fqc8…]

The second thing is replies with quotes. Similarly to the image problem, when replying to a message, the nickname ends up on its own line in IRC. However, in that case it is even worse as the line is posted after the actual message. This might be an additional bug though, I presume.

...

This works fine if the reply does not come via the bridge but directly from MM. So maybe some of above could be considered matterbridge bugs instead of a matterircd problems but it might not be easily fixable there and the issues are way more apparent in IRC.

Is this still a problem with the latest matterircd? One with the changes that doesn't split the lines per this PR #482 ?

42wim commented

Closed as no response