summaryrefslogtreecommitdiffstats
path: root/gateway/router.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-08-29 20:28:44 +0200
committerWim <wim@42.be>2017-08-29 20:28:44 +0200
commit2f7df2df432b3619a95e7eb6b3d8e511b105d5cf (patch)
treeff336e650bd8a27e1491e2cd60ab733f806f7dff /gateway/router.go
parentad3a753718cb8cff85ebbe06a663a315800db6c8 (diff)
downloadmatterbridge-msglm-2f7df2df432b3619a95e7eb6b3d8e511b105d5cf.tar.gz
matterbridge-msglm-2f7df2df432b3619a95e7eb6b3d8e511b105d5cf.tar.bz2
matterbridge-msglm-2f7df2df432b3619a95e7eb6b3d8e511b105d5cf.zip
Do not add messages without ID to cache
Diffstat (limited to 'gateway/router.go')
-rw-r--r--gateway/router.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/gateway/router.go b/gateway/router.go
index 56518e6c..28f81335 100644
--- a/gateway/router.go
+++ b/gateway/router.go
@@ -103,7 +103,7 @@ func (r *Router) handleReceive() {
msgIDs = append(msgIDs, gw.handleMessage(msg, br)...)
}
// only add the message ID if it doesn't already exists
- if _, ok := gw.Messages.Get(msg.ID); !ok {
+ if _, ok := gw.Messages.Get(msg.ID); !ok && msg.ID != "" {
gw.Messages.Add(msg.ID, msgIDs)
}
}