refactor: split SISMEMBER into two commands

This commit is contained in:
Paul Makles
2023-04-22 10:41:12 +01:00
parent 43e45aef3f
commit 7f86337cb2
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View File

@@ -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",

View File

@@ -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" }

View File

@@ -114,7 +114,7 @@ pub async fn presence_filter_online(user_ids: &'_ [String]) -> HashSet<String> {
// 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<bool> = 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() {