commit 11faa611d7e673899d4aad9b7b911b6d44c04dda
Author: Wim <wim@42.be>
Date: Sun Feb 17 22:45:23 2019 +0000
diff --git a/gateway/gateway.go b/gateway/gateway.go
index 8b3ccf0..eaffca1 100644
--- a/gateway/gateway.go
+++ b/gateway/gateway.go
@@ -1759 +1759 @@ 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)
}