presence refactor
This commit is contained in:
@@ -125,20 +125,15 @@ pub(crate) async fn sync_events_route(
|
||||
) -> Result<sync_events::v3::Response, RumaResponse<UiaaResponse>> {
|
||||
let (sender_user, sender_device) = body.sender();
|
||||
|
||||
// Presence update
|
||||
if services.config.allow_local_presence {
|
||||
services
|
||||
.presence
|
||||
.ping_presence(sender_user, &body.body.set_presence)
|
||||
.await
|
||||
.log_err()
|
||||
.ok();
|
||||
services
|
||||
.presence
|
||||
.maybe_ping_presence(sender_user, &body.body.set_presence)
|
||||
.await
|
||||
.log_err()
|
||||
.ok();
|
||||
|
||||
// Record user as actively syncing for push suppression heuristic.
|
||||
if services.config.suppress_push_when_active {
|
||||
services.presence.note_sync(sender_user).await;
|
||||
}
|
||||
}
|
||||
// Record user as actively syncing for push suppression heuristic.
|
||||
services.presence.note_sync(sender_user).await;
|
||||
|
||||
let mut since = body
|
||||
.body
|
||||
|
||||
Reference in New Issue
Block a user