Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 3259e93430b304216b54d19eb69856afddbe8d23 Author: Wim <wim@42.be> Date: Sun Oct 23 20:58:04 2016 +0000 Only send to channels defined in config. Fixes #53 diff --git a/gateway/gateway.go b/gateway/gateway.go index 6f79799..45bb9e3 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -907 +9013 @@ 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) {