catch up on missed d->m messages when logging in

This commit is contained in:
Cadence Ember 2023-08-19 22:54:23 +12:00
parent 0f20dcab6d
commit 3436759504
16 changed files with 268 additions and 16 deletions

View file

@ -41,9 +41,8 @@ async function ensureWebhook(channelID, forceCreate = false) {
async function withWebhook(channelID, callback) {
const webhook = await ensureWebhook(channelID, false)
return callback(webhook).catch(e => {
console.error(e)
// TODO: check if the error was webhook-related and if webhook.created === false, then: const webhook = ensureWebhook(channelID, true); return callback(webhook)
throw new Error(e)
throw e
})
}