Skip to content
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

Status messages aren't included in initial syncs if the sender is offline #13507

Open
matrixbot opened this issue Dec 20, 2023 · 0 comments
Open

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 20, 2023

This issue has been migrated from #13507.


This means if a user sets their status message while another user is logged out of all of their devices, that other user won't get the (new) status message. This is causing issues with deployments relying on status messages being distributed reliably.

A fix could be:

diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 741504ba9f..dcca322b56 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -1814,7 +1814,10 @@ class PresenceEventSource(EventSource[int, UserPresenceState]):
         return [
             update
             for update in presence_updates
-            if update.state != PresenceState.OFFLINE
+            if (
+                update.state != PresenceState.OFFLINE
+                or update.status_msg
+            )
         ]
 
     def get_current_key(self) -> int:

Though I'm not fully sure of the performance implications and what it would mean in terms of the increase in the size of initial sync responses.

We could technically add a configuration setting to switch to this behaviour but it doesn't sound like the right solution to me.

@matrixbot matrixbot changed the title Dummy issue Status messages aren't included in initial syncs if the sender is offline Dec 21, 2023
@matrixbot matrixbot reopened this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant