From c23252ab53182cc6e68086f29c7137fbc27917ee Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 22 Nov 2020 17:18:48 +0100 Subject: Disable webhook editing (discord) (#1296) See https://github.com/42wim/matterbridge/issues/1255 and https://github.com/qaisjp/go-discord-irc/issues/57 Webhook edits gets ratelimited which cause other problems with matterbridge. Disabling for now. --- bridge/discord/discord.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'bridge') diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index 0df03212..e7d98c10 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -142,12 +142,16 @@ func (b *Bdiscord) Connect() error { } b.canEditWebhooks = len(channelsDenied) == 0 - if b.canEditWebhooks { - b.Log.Info("Can manage webhooks; will edit channel for global webhook on send") - } else { - b.Log.Warn("Can't manage webhooks; won't edit channel for global webhook on send") - b.Log.Warn("Can't manage webhooks in channels: ", strings.Join(channelsDenied, ", ")) - } + b.canEditWebhooks = false + b.Log.Info("Webhook editing is disabled because of ratelimit issues") + /* + if b.canEditWebhooks { + b.Log.Info("Can manage webhooks; will edit channel for global webhook on send") + } else { + b.Log.Warn("Can't manage webhooks; won't edit channel for global webhook on send") + b.Log.Warn("Can't manage webhooks in channels: ", strings.Join(channelsDenied, ", ")) + } + */ } b.channelsMutex.RUnlock() -- cgit v1.2.3