presence refactor

This commit is contained in:
dasha_uwu authored and Jason Volk committed 2025-09-23 05:16:29 +00:00
1 parent fe46755418
commit e0169e3dca
6 files changed
+77 -88

No files matched your search

+8 -12
View File
@@ -49,12 +49,10 @@ pub(crate) async fn set_read_marker_route(
}
if let Some(event) = &body.read_receipt {
if services.config.allow_local_presence {
services
.presence
.ping_presence(sender_user, &ruma::presence::PresenceState::Online)
.await?;
}
services
.presence
.maybe_ping_presence(sender_user, &ruma::presence::PresenceState::Online)
.await?;
let receipt_content = BTreeMap::from_iter([(
event.to_owned(),
@@ -137,12 +135,10 @@ pub(crate) async fn create_receipt_route(
.await?;
},
| create_receipt::v3::ReceiptType::Read => {
if services.config.allow_local_presence {
services
.presence
.ping_presence(sender_user, &ruma::presence::PresenceState::Online)
.await?;
}
services
.presence
.maybe_ping_presence(sender_user, &ruma::presence::PresenceState::Online)
.await?;
let receipt_content = BTreeMap::from_iter([(
body.event_id.clone(),