From 7f86337cb2b26e4c09680185162d305e7a22c588 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sat, 22 Apr 2023 10:41:12 +0100 Subject: [PATCH] refactor: split `SISMEMBER` into two commands --- Cargo.lock | 2 +- Cargo.toml | 2 +- crates/quark/src/presence/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 19e0577f..9aa64794 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2644,7 +2644,7 @@ dependencies = [ [[package]] name = "redis" version = "0.22.3" -source = "git+https://github.com/insertish/redis-rs?rev=6575a6b1c09eb8c9cc7f0082d95fe6b8f903c4d7#6575a6b1c09eb8c9cc7f0082d95fe6b8f903c4d7" +source = "git+https://github.com/insertish/redis-rs?rev=1a41faf356fd21aebba71cea7eb7eb2653e5f0ef#1a41faf356fd21aebba71cea7eb7eb2653e5f0ef" dependencies = [ "async-std", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 68903beb..b51fd959 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,4 +3,4 @@ members = ["crates/*"] [patch.crates-io] # mobc-redis = { git = "https://github.com/insertish/mobc", rev = "8b880bb59f2ba80b4c7bc40c649c113d8857a186" } -redis = { git = "https://github.com/insertish/redis-rs", rev = "6575a6b1c09eb8c9cc7f0082d95fe6b8f903c4d7" } +redis = { git = "https://github.com/insertish/redis-rs", rev = "1a41faf356fd21aebba71cea7eb7eb2653e5f0ef" } diff --git a/crates/quark/src/presence/mod.rs b/crates/quark/src/presence/mod.rs index 6505ee3c..fe50537b 100644 --- a/crates/quark/src/presence/mod.rs +++ b/crates/quark/src/presence/mod.rs @@ -114,7 +114,7 @@ pub async fn presence_filter_online(user_ids: &'_ [String]) -> HashSet { // Ok so, if this breaks, that means we've lost the Redis patch which adds SMISMEMBER // Currently it's patched in through a forked repository, investigate what happen to it let data: Vec = conn - .sismember("online", user_ids) + .smismember("online", user_ids) .await .expect("this shouldn't happen, please read this code! presence/mod.rs"); if data.is_empty() {