RocketChat / Rocket.Chat.js.SDK

Utility for apps and bots to interact with Rocket.Chat via DDP and/or API
MIT License
136 stars 95 forks source link

[BUG] Reopen the connection causes duplication of messages #114

Open cuonghuunguyen opened 4 years ago

cuonghuunguyen commented 4 years ago

Description

When the DDP connection to the BOT gets lost, the BOT will try to reopen the connection. When the connection is back, it will try to re-subscribe to the topics without unsubscribing the old ones. That can cause duplication of the message in the method bot.respondToMessages()

Step to reproduce