mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 01:58:07 +01:00
Add check for existing key to MessagesCacheInsertSharedMultiRecipientPayloadAndViewsScript
This commit is contained in:
@@ -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