mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-22 00:38:02 +01:00
Allow presence keys to expire if not periodically renewed
This commit is contained in:
committed by
Jon Chambers
parent
4e131858ca
commit
92d36b725f
7
service/src/main/resources/lua/renew_presence.lua
Normal file
7
service/src/main/resources/lua/renew_presence.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
local presenceKey = KEYS[1]
|
||||
local presenceUuid = ARGV[1]
|
||||
local expireSeconds = ARGV[2]
|
||||
|
||||
if redis.call("GET", presenceKey) == presenceUuid then
|
||||
redis.call("EXPIRE", presenceKey, expireSeconds)
|
||||
end
|
||||
Reference in New Issue
Block a user