FIX: Update PresenceChannel#present to work for redis 6.0 (#14180)

FIX: Update PresenceChannel#present to work for redis 6.0 (#14180)

The LT parameter was only added in redis 6.2. We can make do with NX instead

diff --git a/lib/presence_channel.rb b/lib/presence_channel.rb
index 210b0f2..4ac48f0 100644
--- a/lib/presence_channel.rb
+++ b/lib/presence_channel.rb
@@ -484,9 +484,9 @@ class PresenceChannel
         added_users = 1
         redis.call('SET', mutex_key, mutex_value, 'EX', #{MUTEX_TIMEOUT_SECONDS})
       end
-      -- Add the channel to the global channel list. 'LT' means the value will
-      -- only be set if it's lower than the existing value
-      redis.call('ZADD', channels_key, "LT", expires, tostring(channel))
+      -- Add the channel to the global channel list. 'NX' means the value will
+      -- only be set if doesn't already exist
+      redis.call('ZADD', channels_key, "NX", expires, tostring(channel))
     end
 
     redis.call('EXPIREAT', hash_key, expires + #{GC_SECONDS})

GitHub sha: b47f288b13dbdf940055b04b826486cd99552c61

This commit appears in #14180 which was approved by CvX. It was merged by davidtaylorhq.