5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 04:40:26 +00:00

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.
This commit is contained in:
Wim 2020-11-22 17:18:48 +01:00 committed by GitHub
parent 1a3c57a031
commit c23252ab53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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