chat-linker
chat-linker copied to clipboard
Telegram -> XMPP loses messages when they're posted frequently
Consider the following situation: three Telegram users post some messages in one second, e.g.
(TELEGRAM SIDE)
[12:34:56] <@telegram1> msg1
[12:34:56] <@telegram2> msg2
[12:34:56] <@telegram3> msg3
These messages should be translated by bot without any problems:
(JABBER SIDE, EXPECTED)
[12:34:57] <tg> <@telegram1> msg1
[12:34:57] <tg> <@telegram2> msg2
[12:34:57] <tg> <@telegram3> msg3
But actually some messages will definitely be lost:
(JABBER SIDE, ACTUAL)
[12:34:57] <tg> <@telegram1> msg1
[12:34:57] <tg> <@telegram3> msg3
Thanx for u report. This is related to #11 issue
@jt3k hello, I've privately discussed the situation with @Newlifer and I don't think that's related to #11. That's a separate bug. I'll reopen it and update the description.
I suspect that the problem here is that XMPP server tries to reduce spam and ignores the messages if they're posted too frequently. The simplest solution is to add message throttling mechanism on the XMPP side, and e.g. sleep for 1 second after every message.
hm... I assumed that this issue about stickers. Ok.
Yes. the "throttled message send" -- that is problem.
The throttling is a problem only on specific non-default server configurations, i think. I never experienced it anywhere but on jabber.ru.