From f35b91eb2ed8153cb5e04f4ba96c41ba802f1bbb Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Tue, 5 Nov 2019 10:04:43 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=B4=F0=9F=9A=BF=20Checkpoint=20./serve?= =?UTF-8?q?r.js:933874/13?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 4b1758c..2bd6fa1 100644 --- a/server.js +++ b/server.js @@ -108,7 +108,7 @@ request.post( const accessToken = JSON.parse(body)["access_token"]; const loop = () => { console.log("loop", lastClosed); - if (lastSeen < new Date() - closingTimeout && lastClosed < lastSeen) { + if (fuzIsOpen && lastSeen < new Date() - closingTimeout && lastClosed < lastSeen) { // the Fuz is newly closed, notify on matrix and write file to survive reboot lastClosed = new Date(); //lastNofified = new Date();