mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 04:16:53 +00:00
Add check for existing key to MessagesCacheInsertSharedMultiRecipientPayloadAndViewsScript
This commit is contained in:
1 parent
020c21f4ef
commit
5bc6ff0e77
6 files changed
+45
-20
No files matched your search
@@ -4,6 +4,10 @@ local sharedMrmKey = KEYS[1] -- [string] the key containing the shared MRM data
|
||||
local mrmData = ARGV[1] -- [bytes] the serialized multi-recipient message data
|
||||
-- the remainder of ARGV is list of recipient keys and view data
|
||||
|
||||
if 1 == redis.call("EXISTS", sharedMrmKey) then
|
||||
return redis.error_reply("ERR key exists")
|
||||
end
|
||||
|
||||
redis.call("HSET", sharedMrmKey, "data", mrmData);
|
||||
redis.call("EXPIRE", sharedMrmKey, 604800) -- 7 days
|
||||
|
||||
|
||||
Reference in new issue
Block a user