Fix parameters in logout notification functions

This commit is contained in:
qaz741wsd856 2026-04-04 16:05:01 +00:00
parent 17bb86dbbc
commit 295a45462b
2 changed files with 4 additions and 4 deletions

View File

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

View File

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