diff options
author | Erik Johnston <erik@matrix.org> | 2023-01-17 09:29:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 09:29:58 +0000 |
commit | 2b084c5b710d9630178484e6ade597ca7fa814b6 (patch) | |
tree | d80e5964b12d2e3710dfe49186fb0229c4afc1dc /synapse/replication/tcp/client.py | |
parent | Add parameter to control whether we do a partial state join (#14843) (diff) | |
download | synapse-2b084c5b710d9630178484e6ade597ca7fa814b6.tar.xz |
Merge device list replication streams (#14833)
Diffstat (limited to 'synapse/replication/tcp/client.py')
-rw-r--r-- | synapse/replication/tcp/client.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/replication/tcp/client.py b/synapse/replication/tcp/client.py index 7263bb2796..31022ce5fb 100644 --- a/synapse/replication/tcp/client.py +++ b/synapse/replication/tcp/client.py @@ -187,7 +187,7 @@ class ReplicationDataHandler: elif stream_name == DeviceListsStream.NAME: all_room_ids: Set[str] = set() for row in rows: - if row.entity.startswith("@"): + if row.entity.startswith("@") and not row.is_signature: room_ids = await self.store.get_rooms_for_user(row.entity) all_room_ids.update(room_ids) self.notifier.on_new_event( @@ -422,7 +422,11 @@ class FederationSenderHandler: # The entities are either user IDs (starting with '@') whose devices # have changed, or remote servers that we need to tell about # changes. - hosts = {row.entity for row in rows if not row.entity.startswith("@")} + hosts = { + row.entity + for row in rows + if not row.entity.startswith("@") and not row.is_signature + } for host in hosts: self.federation_sender.send_device_messages(host, immediate=False) |