4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-03 09:37:44 +00:00

Fix channel ID problem with multiple gateways (discord). Fixes #953 (#977)

This commit is contained in:
Wim
2020-01-09 23:54:04 +01:00
committed by GitHub
parent 9d84d6dd64
commit 4c44515f9d
3 changed files with 9 additions and 19 deletions

View File

@ -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)