diff options
author | Erik Johnston <erikj@jki.re> | 2016-09-05 13:57:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-05 13:57:30 +0100 |
commit | 0237a0d1a5c79d0aa882ed5962aa40d0571d8349 (patch) | |
tree | f2711e4ba3a5bb480e013b21b27a5c566311a9ce /synapse/handlers/federation.py | |
parent | Merge pull request #1068 from matrix-org/erikj/bulk_push (diff) | |
parent | Use get_joined_users_from_context instead of manually looking up hosts (diff) | |
download | synapse-0237a0d1a5c79d0aa882ed5962aa40d0571d8349.tar.xz |
Merge pull request #1069 from matrix-org/erikj/host_find
Use get_joined_users_from_context instead of manually looking up hosts
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index dc90a5dde4..8a1038c44a 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -832,11 +832,13 @@ class FederationHandler(BaseHandler): new_pdu = event - message_handler = self.hs.get_handlers().message_handler - destinations = yield message_handler.get_joined_hosts_for_room_from_state( - context + users_in_room = yield self.store.get_joined_users_from_context(event, context) + + destinations = set( + get_domain_from_id(user_id) for user_id in users_in_room + if not self.hs.is_mine_id(user_id) ) - destinations = set(destinations) + destinations.discard(origin) logger.debug( @@ -1055,11 +1057,12 @@ class FederationHandler(BaseHandler): new_pdu = event - message_handler = self.hs.get_handlers().message_handler - destinations = yield message_handler.get_joined_hosts_for_room_from_state( - context + users_in_room = yield self.store.get_joined_users_from_context(event, context) + + destinations = set( + get_domain_from_id(user_id) for user_id in users_in_room + if not self.hs.is_mine_id(user_id) ) - destinations = set(destinations) destinations.discard(origin) logger.debug( |