From 43a5e9990bbf003f92b1c16922e5006d14012fcc Mon Sep 17 00:00:00 2001 From: Kyle Fang Date: Fri, 1 Apr 2022 14:53:10 +0800 Subject: [PATCH] fix: bug --- functions/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/src/index.ts b/functions/src/index.ts index 67278fd..cc9a1de 100644 --- a/functions/src/index.ts +++ b/functions/src/index.ts @@ -51,7 +51,7 @@ async function checkUser(chatId: string, token: string) { }).then((r) => r.json()); for (const notification of notifications) { const sentRef = admin.database().ref(`/sent/${chatId}/${notification.id}`); - if ((await sentRef.get()).val() !== notification.updated_at) { + if ((await sentRef.get()).val() === notification.updated_at) { continue; } await bot.telegram.sendMessage(