summaryrefslogtreecommitdiffstats
path: root/gateway
diff options
context:
space:
mode:
Diffstat (limited to 'gateway')
-rw-r--r--gateway/gateway.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go
index b550430a..4cf4e0ec 100644
--- a/gateway/gateway.go
+++ b/gateway/gateway.go
@@ -192,9 +192,10 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) {
return
}
originchannel := msg.Channel
+ origmsg := msg
for _, channel := range gw.DestChannelFunc(&msg, *dest) {
// do not send to ourself
- if channel.ID == getChannelID(msg) {
+ if channel.ID == getChannelID(origmsg) {
continue
}
log.Debugf("Sending %#v from %s (%s) to %s (%s)", msg, msg.Account, originchannel, dest.Account, channel.Name)