Skip to content

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

@serhii8nahornyi

Description

@serhii8nahornyi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-PresenceO-OccasionalAffects or can be seen by some users regularly or most users rarelyS-MinorImpairs non-critical functionality or suitable workarounds existT-Defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions