mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-26 07:29:24 +00:00
Do not add messages without ID to cache
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user