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,8 +90,14 @@ func (gw *Gateway) mapIgnores() {
}
func (gw *Gateway) getDestChannel(msg *config.Message, dest string) []string {
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) {
if gw.ignoreMessage(&msg) {