mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 10:36:47 +00:00
Check that the return of ZRANGEBYSCORE isn't an empty list.
This commit is contained in:
1 parent
7dd40fd2d4
commit
c885540749
1 file changed
+1
-1
@@ -6,7 +6,7 @@ local lastMessageId = tonumber(redis.call("ZRANGE", queueKey, -1, -1, "WITHSCOR
|
||||
|
||||
if firstMessageId and lastMessageId then
|
||||
for messageId = firstMessageId,lastMessageId do
|
||||
if redis.call("ZRANGEBYSCORE", queueKey, messageId, messageId) then
|
||||
if next(redis.call("ZRANGEBYSCORE", queueKey, messageId, messageId)) then
|
||||
-- This message actually exists, and its GUID may be pointing to the wrong ID
|
||||
local guid = redis.call("HGET", queueMetadataKey, messageId .. "guid")
|
||||
redis.call("HSET", queueMetadataKey, guid, messageId)
|
||||
|
||||
Reference in new issue
Block a user