From 675c7d6c0d807fd9e2a51d17d0714ea75fdf4bb1 Mon Sep 17 00:00:00 2001 From: Zomatree Date: Wed, 24 Apr 2024 02:29:31 +0100 Subject: [PATCH] fix redis key inconsistancy --- crates/bonfire/src/events/impl.rs | 10 +++++----- crates/voice-ingress/src/main.rs | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/bonfire/src/events/impl.rs b/crates/bonfire/src/events/impl.rs index 3f6eb954..744a99f8 100644 --- a/crates/bonfire/src/events/impl.rs +++ b/crates/bonfire/src/events/impl.rs @@ -580,10 +580,10 @@ impl State { for id in members { let unique_key = format!("{channel_or_server_id}-{id}"); - let (audio, deafened, screensharing, camera) = conn + let (can_publish, can_receive, screensharing, camera) = conn .mget::<_, (bool, bool, bool, bool)>(&[ - format!("audio-{unique_key}"), - format!("deafened-{unique_key}"), + format!("can_publish-{unique_key}"), + format!("can_receive-{unique_key}"), format!("screensharing-{unique_key}"), format!("camera-{unique_key}"), ]) @@ -592,8 +592,8 @@ impl State { let voice_state = v0::UserVoiceState { id, - can_receive: audio, - can_publish: deafened, + can_receive, + can_publish, screensharing, camera, }; diff --git a/crates/voice-ingress/src/main.rs b/crates/voice-ingress/src/main.rs index d6b0a813..28147efc 100644 --- a/crates/voice-ingress/src/main.rs +++ b/crates/voice-ingress/src/main.rs @@ -60,8 +60,8 @@ async fn ingress(db: &State, body: Json) -> Result, body: Json) -> Result, body: Json) -> Result>(&[ format!("vc-{unique_key}"), - format!("audio-{unique_key}"), - format!("deafened-{unique_key}"), + format!("can_publish-{unique_key}"), + format!("can_receive-{unique_key}"), format!("screensharing-{unique_key}"), format!("camera-{unique_key}"), ]) @@ -156,7 +156,7 @@ async fn ingress(db: &State, body: Json) -> Result { - conn.set::<_, _, String>(format!("audio-{unique_key}"), value) + conn.set::<_, _, String>(format!("can_receive-{unique_key}"), value) .await .to_internal_error()?;