4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-02 10:26:18 +00:00

Add protocol to msg.ID in cache (#596)

This commit is contained in:
Wim
2018-11-19 21:28:23 +01:00
committed by GitHub
parent 57eba77561
commit ae32bae791
5 changed files with 20 additions and 25 deletions

View File

@ -109,8 +109,8 @@ 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 && msg.ID != "" {
gw.Messages.Add(msg.ID, msgIDs)
if _, ok := gw.Messages.Get(msg.Protocol + " " + msg.ID); !ok && msg.ID != "" {
gw.Messages.Add(msg.Protocol+" "+msg.ID, msgIDs)
}
}
}