From 295a45462b74587db502f103b4d72f36be289c0d Mon Sep 17 00:00:00 2001 From: qaz741wsd856 Date: Sat, 4 Apr 2026 16:05:01 +0000 Subject: [PATCH] Fix parameters in logout notification functions --- src/api/notifications.rs | 4 ++-- src/api/push.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/notifications.rs b/src/api/notifications.rs index fb82d3c9..492fdb19 100644 --- a/src/api/notifications.rs +++ b/src/api/notifications.rs @@ -363,7 +363,7 @@ impl WebSocketUsers { if *NOTIFICATIONS_DISABLED { return; } - let acting_device_id = device.map(|d| d.uuid.clone()); + let acting_device_id = acting_device.map(|d| d.uuid.clone()); let data = create_update( vec![("UserId".into(), user.uuid.to_string().into()), ("Date".into(), serialize_date(user.updated_at))], UpdateType::LogOut, @@ -375,7 +375,7 @@ impl WebSocketUsers { } if CONFIG.push_enabled() { - push_logout(user, device, conn).await; + push_logout(user, acting_device, conn).await; } } diff --git a/src/api/push.rs b/src/api/push.rs index 27358bea..5000869d 100644 --- a/src/api/push.rs +++ b/src/api/push.rs @@ -193,8 +193,8 @@ pub async fn push_logout(user: &User, acting_device: Option<&Device>, conn: &DbC tokio::task::spawn(send_to_push_relay(json!({ "userId": user.uuid, "organizationId": (), - "deviceId": device.and_then(|d| d.push_uuid.as_ref()), - "identifier": device.map(|d| &d.uuid), + "deviceId": acting_device.and_then(|d| d.push_uuid.as_ref()), + "identifier": acting_device.map(|d| &d.uuid), "type": UpdateType::LogOut as i32, "payload": { "userId": user.uuid,