Skip to content

Presence Status Reverts After Page Refresh Despite Correct Toggle State #4791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
serhii8nahornyi opened this issue Apr 9, 2025 · 0 comments
Labels
A-Presence O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@serhii8nahornyi
Copy link

We have found out that there is clear inconsistency in user presence status occurs after a page refresh.

Steps to Reproduce:

  1. Set the presence status to "Online".
  2. Refresh the page.
  3. Observe that the displayed status is "Online" but matrix reverts in status_presence to the previous state"Offline", even though the UI toggle retains the newly set status "Online".
  4. Refreshing the page without any status change would keep it correct to "Online".
  5. Change the status to "Offline".
  6. Refresh the page.
  7. Presence status will be shown "Offline" but matrix status_presence returns "Online".

Expected Behavior:
Presence status should persist and reflect the user’s last-set value after a page refresh

Observed Behavior:
After refresh, the UI toggle shows the correct status (e.g., "Busy"), but the actual presence data reverts to the prior state. This suggests a synchronization failure between the client’s cached state and the server’s response post-refresh.

Might be Related Issue:
This may connect to matrix-js-sdk#2535, which highlights unreliable event triggering for user presence updates. The problem could stem from missing or delayed User.presence event emissions after rehydration.

Tested Environments:

  • Google Chrome, Microsoft Edge, Safari
  • Multiple homeservers and clients
  • We use matrix-js-sdk v37.2.0 at the moment
@dosubot dosubot bot added the T-Defect label Apr 9, 2025
@dbkr dbkr added A-Presence S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely labels Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Presence O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

No branches or pull requests

2 participants