mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
presence refactor
This commit is contained in:
1 parent
fe46755418
commit
e0169e3dca
6 files changed
+77
-88
No files matched your search
@@ -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(),
|
||||
|
||||
Reference in new issue
Block a user