presence: aggregate device updates

This commit is contained in:
Jared L
2026-01-18 16:31:36 +11:00
parent 3e1246984c
commit 2b32769649
6 changed files with 628 additions and 97 deletions

View File

@@ -23,7 +23,13 @@ pub(crate) async fn set_presence_route(
services
.presence
.set_presence(body.sender_user(), &body.presence, None, None, body.status_msg.clone())
.set_presence_for_device(
body.sender_user(),
body.sender_device.as_deref(),
&body.presence,
body.status_msg.clone(),
PresenceUpdateReason::ClientRequest,
)
.await?;
Ok(set_presence::v3::Response {})

View File

@@ -268,11 +268,11 @@ async fn handle_edu_presence_update(
services
.presence
.set_presence(
.set_presence_from_federation(
&update.user_id,
&update.presence,
Some(update.currently_active),
Some(update.last_active_ago),
update.currently_active,
update.last_active_ago,
update.status_msg.clone(),
)
.await