Update MeetBot to provide full-duplex support between Telegram and IRC

On IRC MeetBot is used and because it can’t interpret the prefixes sent by the Telegram-Bridge Telegram stay read-only. This topic has been created to follow the development of a better integration between IRC and Telegram.

From IRC discussion :
Meetbot runs Limnoria, the initial idea is to see if a event filter plugin can be implemented that does some conversion on the messages coming from the bridge.

As mentioned in the community meeting of 3rd February, Matterbridge is used as bridge between Telegram and IRC.

See with @Keto to get more information.

I think the first step would be to create a dev environment with a testing telegram group and IRC channel.

The meetbot functionality is a plugin on the Limnoria IRC bot (successor of Supybot), and probably does not need any modification.

What I had in mind (instead of patching the meetbot plugin) is to implement a separate plugin that would intercept the messages from the bridge user and do necessary modifications so that it would look like a direct message from a normal user. That is, strip the <nick> prefix from the message and set that in the message object nick attribute (and possibly adjust the other attributes ).

Anyone interested in experimenting with this can take a look at the Limnoria Plugin developer guide and specially the even filtering there.

Prototyping the functionality should not need any special environment setup.

If I take this example from community news, <T42_> 08<unknown> #link foobar.com should be <T42_> #link foobar.com?

In this case, T42_ should be also replaced by a correct username. I’m right?

Yes, T42_ there is the nick of the bridge normally seen by the bot, but with the filter plugin it should be possible to replace that with the Telegram side nick that is in the message text <...> prefix.

There seems to be some color codes added around the prefix by the bridge, which also need to be stripped away.