5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-25 16:25:40 +00:00

Only send to channels defined in config. Fixes #53

This commit is contained in:
Wim 2016-10-23 20:58:04 +02:00
parent ac80c47036
commit 47d38192b2

View File

@ -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) {