From 4c44515f9df8eb0eb67116f05cb50820d800f961 Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 9 Jan 2020 23:54:04 +0100 Subject: Fix channel ID problem with multiple gateways (discord). Fixes #953 (#977) --- bridge/discord/helpers.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bridge/discord/helpers.go') diff --git a/bridge/discord/helpers.go b/bridge/discord/helpers.go index c094e47a..7ea0a365 100644 --- a/bridge/discord/helpers.go +++ b/bridge/discord/helpers.go @@ -96,6 +96,13 @@ func (b *Bdiscord) getChannelName(id string) string { b.channelsMutex.RLock() defer b.channelsMutex.RUnlock() + for _, c := range b.channelInfoMap { + if c.Name == "ID:"+id { + // if we have ID: specified in our gateway configuration return this + return c.Name + } + } + for _, channel := range b.channels { if channel.ID == id { return b.getCategoryChannelName(channel.Name, channel.ParentID) -- cgit v1.2.3