Skip to content

Commit 7a50b64

Browse files
committed
fix(presence): publish online on enable, update auto-idle description
1 parent 1d6cbcf commit 7a50b64

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/app/features/settings/general/General.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ function Editor({ isMobile }: Readonly<{ isMobile: boolean }>) {
483483
<SettingTile
484484
title="Auto-Idle"
485485
focusId="auto-idle-presence"
486-
description="Automatically appear unavailable after 5 minutes of inactivity or when the tab is hidden."
486+
description="Automatically appear unavailable after 5 minutes of inactivity or when the app isn't active."
487487
after={
488488
<Switch
489489
variant="Primary"

src/app/pages/client/ClientNonUIFeatures.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,11 @@ function PresenceFeature() {
852852
mx.setSyncPresence(sendPresence ? undefined : SetPresence.Offline);
853853
// Sliding sync: enable/disable the presence extension on the next poll.
854854
getSlidingSyncManager(mx)?.setPresenceEnabled(sendPresence);
855+
// Explicitly publish online so the server echoes back our presence event,
856+
// which lets useUserPresence update the badge immediately.
857+
if (sendPresence) {
858+
mx.setPresence({ presence: 'online' }).catch(() => {});
859+
}
855860
}, [mx, sendPresence]);
856861

857862
// Auto-idle: set presence to unavailable after 5 minutes of inactivity or

0 commit comments

Comments
 (0)