Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

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

Open
babolivier opened this issue Aug 11, 2022 · 0 comments
Open
Labels
A-Sync defects related to /sync O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@babolivier
Copy link
Contributor

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.

@H-Shay H-Shay added A-Sync defects related to /sync S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Aug 12, 2022
@reivilibre reivilibre added O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. S-Minor Blocks non-critical functionality, workarounds exist. and removed S-Minor Blocks non-critical functionality, workarounds exist. S-Tolerable Minor significance, cosmetic issues, low or no impact to users. labels Aug 24, 2022
@DMRobertson DMRobertson removed the S-Tolerable Minor significance, cosmetic issues, low or no impact to users. label Aug 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Sync defects related to /sync O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

No branches or pull requests

4 participants