summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-04-20 13:37:54 +0100
committerGitHub <noreply@github.com>2021-04-20 13:37:54 +0100
commitdb70435de740b534936df75c435290a37dcc015f (patch)
tree1d68fd60daa7b10009ca3410c0aee4b3308737f8 /synapse/federation
parentFix (final) Bugbear violations (#9838) (diff)
downloadsynapse-db70435de740b534936df75c435290a37dcc015f.tar.xz
Fix bug where we sent remote presence states to remote servers (#9850)
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/sender/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/federation/sender/__init__.py b/synapse/federation/sender/__init__.py
index 6266accaf5..b00a55324c 100644
--- a/synapse/federation/sender/__init__.py
+++ b/synapse/federation/sender/__init__.py
@@ -539,6 +539,10 @@ class FederationSender(AbstractFederationSender):
             # No-op if presence is disabled.
             return
 
+        # Ensure we only send out presence states for local users.
+        for state in states:
+            assert self.is_mine_id(state.user_id)
+
         for destination in destinations:
             if destination == self.server_name:
                 continue