forked from cadence/out-of-your-element
catch up on missed d->m messages when logging in
This commit is contained in:
parent
0f20dcab6d
commit
3436759504
16 changed files with 268 additions and 16 deletions
|
@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue