mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-10-23 11:22:25 +00:00
fix: Don't ping presence for devices which claim to be offline
Fixes https://github.com/gomuks/gomuks/issues/722. Reviewed-by: Ginger <ginger@gingershaped.computer>
This commit is contained in:
1 parent
d7a51c7107
commit
1faa09b6ce
2 files changed
+3
-1
No files matched your search
@@ -0,0 +1 @@
|
||||
Devices which set their presence as "offline" will no longer be considered for presence updates. Contributed by @timedout.
|
||||
@@ -34,6 +34,7 @@
|
||||
},
|
||||
assign,
|
||||
events::presence::{PresenceEvent, PresenceEventContent},
|
||||
presence::PresenceState,
|
||||
serde::Raw,
|
||||
};
|
||||
use service::{
|
||||
@@ -185,7 +186,7 @@ pub(crate) async fn sync_events_route(
|
||||
let sender_device = body.identity.expect_sender_device()?;
|
||||
|
||||
// Presence update
|
||||
if services.config.allow_local_presence {
|
||||
if services.config.allow_local_presence && body.set_presence != PresenceState::Offline {
|
||||
services
|
||||
.presence
|
||||
.ping_presence(sender_user, &body.body.set_presence)
|
||||
|
||||
Reference in new issue
Block a user