mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-21 18:22:00 -08:00
Only send to channels defined in config. Fixes #53
This commit is contained in:
parent
ac80c47036
commit
47d38192b2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user