summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gateway/gateway.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go
index 6f797997..45bb9e34 100644
--- a/gateway/gateway.go
+++ b/gateway/gateway.go
@@ -90,7 +90,13 @@ func (gw *Gateway) mapIgnores() {
}
func (gw *Gateway) getDestChannel(msg *config.Message, dest string) []string {
- return gw.ChannelsOut[dest]
+ channels := gw.ChannelsIn[msg.FullOrigin]
+ for _, channel := range channels {
+ if channel == msg.Channel {
+ return gw.ChannelsOut[dest]
+ }
+ }
+ return []string{}
}
func (gw *Gateway) handleMessage(msg config.Message, dest bridge.Bridge) {