Suggestion from @42wim :)

This commit is contained in:
Patrick Connolly
2018-11-06 06:25:45 +08:00
parent dc15ec288c
commit 64ece62200

View File

@@ -312,11 +312,9 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM
msg.Channel = originchannel msg.Channel = originchannel
} }
if canonicalParentMsgID != "" { msg.ParentID = gw.getDestMsgID(canonicalParentMsgID, dest, channel)
msg.ParentID = gw.getDestMsgID(canonicalParentMsgID, dest, channel) if msg.ParentID == "" {
if msg.ParentID == "" { msg.ParentID = canonicalParentMsgID
msg.ParentID = canonicalParentMsgID
}
} }
mID, err := dest.Send(msg) mID, err := dest.Send(msg)