jt3k / chat-linker

the bridge between jabber and telegram over chat-bots
MIT License
46 stars 9 forks source link

Resend failed XMPP messages #23

Open ForNeVeR opened 7 years ago

ForNeVeR commented 7 years ago

Consider this scenario:

  1. XMPP gets implicitly disconnected, but the client is still not aware of it.
  2. Bot receives a Telegram message.
  3. Bot tries to send it to XMPP and realizes it's disconnected. XMPP throws an error.
  4. Bot reconnects to XMPP and everything is alright, except that the message it tried to send at p. 3 is now lost.

Bot should buffer the message if an error has been occured on send and resend the message after the reconnect.