5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-28 23:01:34 +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 { 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) { func (gw *Gateway) handleMessage(msg config.Message, dest bridge.Bridge) {