mirror of
				https://api.glitch.com/git/presence-button
				synced 2025-10-31 22:25:35 +00:00 
			
		
		
		
	⏲🏗 Checkpoint
./server.js:933874/6123
This commit is contained in:
		
							parent
							
								
									3f0b9967cc
								
							
						
					
					
						commit
						82716b4cec
					
				| @ -76,8 +76,10 @@ const listener = app.listen(process.env.PORT, function() { | |||||||
| const loop = () => { | const loop = () => { | ||||||
|   console.log("loop", lastClosed); |   console.log("loop", lastClosed); | ||||||
|   if (lastSeen < new Date() - 2 * 60 * 1000 && lastClosed < lastSeen) { |   if (lastSeen < new Date() - 2 * 60 * 1000 && lastClosed < lastSeen) { | ||||||
|  |     // the Fuz is newly closed, notify on matrix and write file to survive reboot
 | ||||||
|     lastClosed = new Date(); |     lastClosed = new Date(); | ||||||
|   } |   } | ||||||
|  | 
 | ||||||
|   setTimeout(loop, 10 * 1000); |   setTimeout(loop, 10 * 1000); | ||||||
| }; | }; | ||||||
| setTimeout(loop, 1 * 1000); // give some time for presence button to show up (1 min)
 | setTimeout(loop, 1 * 1000); // give some time for presence button to show up (1 min)
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user