Skip to content

Commit d3d3888

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

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
@@ -482,7 +482,7 @@ function Editor({ isMobile }: Readonly<{ isMobile: boolean }>) {
482482
<SettingTile
483483
title="Auto-Idle"
484484
focusId="auto-idle-presence"
485-
description="Automatically appear unavailable after 5 minutes of inactivity or when the tab is hidden."
485+
description="Automatically appear unavailable after 5 minutes of inactivity or when the app isn't active."
486486
after={
487487
<Switch
488488
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)