mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 23:28:04 +01:00
Check that the return of ZRANGEBYSCORE isn't an empty list.
This commit is contained in:
committed by
Jon Chambers
parent
7dd40fd2d4
commit
c885540749
@@ -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