summaryrefslogtreecommitdiffstats
path: root/gateway
diff options
context:
space:
mode:
Diffstat (limited to 'gateway')
-rw-r--r--gateway/gateway.go4
-rw-r--r--gateway/router.go2
2 files changed, 4 insertions, 2 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go
index aca8ecec..d09741fa 100644
--- a/gateway/gateway.go
+++ b/gateway/gateway.go
@@ -186,7 +186,9 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM
fmt.Println(err)
}
// append the message ID (mID) from this bridge (dest) to our brMsgIDs slice
- brMsgIDs = append(brMsgIDs, &BrMsgID{dest, mID})
+ if mID != "" {
+ brMsgIDs = append(brMsgIDs, &BrMsgID{dest, mID})
+ }
}
return brMsgIDs
}
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)
}
}