ping online presence on read updates like synapse
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
9c6908b8c1
commit
468071336b
1 changed files with 16 additions and 0 deletions
|
@ -49,6 +49,14 @@ pub(crate) async fn set_read_marker_route(
|
|||
.reset_notification_counts(sender_user, &body.room_id);
|
||||
}
|
||||
|
||||
// ping presence
|
||||
if services.globals.allow_local_presence() {
|
||||
services
|
||||
.presence
|
||||
.ping_presence(sender_user, &ruma::presence::PresenceState::Online)
|
||||
.await?;
|
||||
}
|
||||
|
||||
if let Some(event) = &body.read_receipt {
|
||||
let receipt_content = BTreeMap::from_iter([(
|
||||
event.to_owned(),
|
||||
|
@ -117,6 +125,14 @@ pub(crate) async fn create_receipt_route(
|
|||
.reset_notification_counts(sender_user, &body.room_id);
|
||||
}
|
||||
|
||||
// ping presence
|
||||
if services.globals.allow_local_presence() {
|
||||
services
|
||||
.presence
|
||||
.ping_presence(sender_user, &ruma::presence::PresenceState::Online)
|
||||
.await?;
|
||||
}
|
||||
|
||||
match body.receipt_type {
|
||||
| create_receipt::v3::ReceiptType::FullyRead => {
|
||||
let fully_read_event = ruma::events::fully_read::FullyReadEvent {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue