don't block on discord
All checks were successful
Build and push image for doorman-homeassistant / docker (push) Successful in 42s
Build and push Doorman UI / API / docker (push) Successful in 1m24s
Build and push image for doorman-homeassistant / deploy-gitainer (push) Successful in 8s

This commit is contained in:
Martin Dimitrov 2024-10-29 20:34:27 -07:00
parent 29a839aef8
commit 99d0353af3
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ exports.getDiscordClient = async (context) => {
const client = new Client({ const client = new Client({
intents: [GatewayIntentBits.DirectMessages], intents: [GatewayIntentBits.DirectMessages],
rest: { rest: {
timeout: 4_000, // 4s timeout: 60_000, // 60s
} }
}); });

View File

@ -90,7 +90,7 @@ exports.handler = async function(context, event, callback) {
console.log( console.log(
invokeId, "UnlockPromise: I was the fastest, so I will attempt to notify discord users before resolving with unlock" invokeId, "UnlockPromise: I was the fastest, so I will attempt to notify discord users before resolving with unlock"
); );
await notifyAllDiscord(context, config, `🔓 Doorman buzzed someone up @ Door "${config.door}"`, JSON.stringify(body.fingerprint)); notifyAllDiscord(context, config, `🔓 Doorman buzzed someone up @ Door "${config.door}"`, JSON.stringify(body.fingerprint));
resolve(twiml); resolve(twiml);
} else { } else {
console.log( console.log(
@ -113,7 +113,7 @@ exports.handler = async function(context, event, callback) {
console.log( console.log(
invokeId, "GracefulFallbackPromise: I was the fastest, so I will attempt to notify discord users before resolving with a call" invokeId, "GracefulFallbackPromise: I was the fastest, so I will attempt to notify discord users before resolving with a call"
); );
await notifyAllDiscord( notifyAllDiscord(
context, context,
config, config,
`📞 Somebody buzzed the door and it dialed through to fallback phone numbers @ Door "${config.door}"`, `📞 Somebody buzzed the door and it dialed through to fallback phone numbers @ Door "${config.door}"`,