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({
intents: [GatewayIntentBits.DirectMessages],
rest: {
timeout: 4_000, // 4s
timeout: 60_000, // 60s
}
});

View File

@ -90,7 +90,7 @@ exports.handler = async function(context, event, callback) {
console.log(
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);
} else {
console.log(
@ -113,7 +113,7 @@ exports.handler = async function(context, event, callback) {
console.log(
invokeId, "GracefulFallbackPromise: I was the fastest, so I will attempt to notify discord users before resolving with a call"
);
await notifyAllDiscord(
notifyAllDiscord(
context,
config,
`📞 Somebody buzzed the door and it dialed through to fallback phone numbers @ Door "${config.door}"`,