mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-08-31 02:22:29 +00:00
fix: presence key was incorrect after other related update (#861)
* fix: presence key was incorrect after other related update Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> * rust analyzer try not to be annoying challenge Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com> --------- Signed-off-by: IAmTomahawkx <iamtomahawkx@gmail.com>
This commit is contained in:
@@ -87,7 +87,9 @@ async fn delete_session_internal(user_id: &str, session_id: u32, skip_region: bo
|
||||
/// Check whether a given user ID is online
|
||||
pub async fn is_online(user_id: &str) -> bool {
|
||||
if let Ok(mut conn) = get_connection().await {
|
||||
conn.exists(user_id).await.unwrap_or(false)
|
||||
conn.exists(format!("sessions:{user_id}"))
|
||||
.await
|
||||
.unwrap_or(false)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user