chat-linker icon indicating copy to clipboard operation
chat-linker copied to clipboard

better XMPP integration

Open oxpa opened this issue 7 years ago • 1 comments

Current implementation uses single account to send all messages. I propose changing this behaviour by using multiple connections into a single conference in XMPP with resources matching telegram user names. (e.g. [email protected]/username)

So if you have a chat of user1, user2, user3 you should join [email protected] three times with nicknames (and from resources) of /user1, /user2, /user3 and send messages from appropriate resource.

On a nick collision add some prefix or suffix.

Later this may be reworked to create a service when the bot can link two chatroom of different networks by a user command.

oxpa avatar Feb 03 '17 11:02 oxpa

First of all, I think that the titular better XMPP integration should be done. You propose a viable solution, but currently I'd vote against that particular solution.

@vitalyster told me about that "component" thing (see XEP-0114). It seems that we can make our bot into a component. That way it'll be authoritative for sending presences on behalf of <username>@telegram.example.com, so it'll be possible to send activity presences and messages from Telegram users to any XMPP server.

I think that we should conduct additional research and go that component way instead of inventing poor ad-hoc solutions for the problem.

ForNeVeR avatar Feb 04 '17 05:02 ForNeVeR