summaryrefslogtreecommitdiffstats
path: root/bridge/rocketchat/handlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/rocketchat/handlers.go')
-rw-r--r--bridge/rocketchat/handlers.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/rocketchat/handlers.go b/bridge/rocketchat/handlers.go
index b44ea46f..a41004d4 100644
--- a/bridge/rocketchat/handlers.go
+++ b/bridge/rocketchat/handlers.go
@@ -40,6 +40,11 @@ func (b *Brocketchat) handleRocketHook(messages chan *config.Message) {
func (b *Brocketchat) handleRocketClient(messages chan *config.Message) {
for message := range b.messageChan {
+ // skip messages with same ID, apparently messages get duplicated for an unknown reason
+ if _, ok := b.cache.Get(message.ID); ok {
+ continue
+ }
+ b.cache.Add(message.ID, true)
b.Log.Debugf("message %#v", message)
m := message
if b.skipMessage(&m) {