diff options
author | Wim <wim@42.be> | 2019-02-17 22:45:23 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2019-02-17 22:45:23 +0100 |
commit | eef654de98af2187504b37708061c735ac4670fb (patch) | |
tree | 1377db17c49e81cb1cfdced9a50dc7455fbc22dc /gateway | |
parent | d76a04bd0a96772cec5b279aaa1ee45235adc707 (diff) | |
download | matterbridge-msglm-eef654de98af2187504b37708061c735ac4670fb.tar.gz matterbridge-msglm-eef654de98af2187504b37708061c735ac4670fb.tar.bz2 matterbridge-msglm-eef654de98af2187504b37708061c735ac4670fb.zip |
Fix bug in #721
Diffstat (limited to 'gateway')
-rw-r--r-- | gateway/gateway.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index 8b3ccf05..eaffca11 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -175,9 +175,9 @@ func (gw *Gateway) getDestChannel(msg *config.Message, dest bridge.Bridge) []con } // discord join/leave is for the whole bridge, isn't a per channel join/leave - if msg.Event == config.EventJoinLeave && dest.Protocol == "discord" && msg.Account == dest.Account { + if msg.Event == config.EventJoinLeave && getProtocol(msg) == "discord" && msg.Channel == "" { for _, channel := range gw.Channels { - if channel.Account == msg.Account && strings.Contains(channel.Direction, "out") && + if channel.Account == dest.Account && strings.Contains(channel.Direction, "out") && gw.validGatewayDest(msg) { channels = append(channels, *channel) } |