diff options
author | Erik Johnston <erik@matrix.org> | 2014-11-12 11:22:51 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-11-12 11:24:11 +0000 |
commit | 6fea478d2e7737c2462b074b935d4427ced5f3d4 (patch) | |
tree | b14646c2e337e3a4d44fd7a61cb6bac60b8c42c6 /synapse/handlers/federation.py | |
parent | SYWEB-146: Fix room ID leaking on recents page when the name of the room is j... (diff) | |
download | synapse-6fea478d2e7737c2462b074b935d4427ced5f3d4.tar.xz |
Fix bugs with invites/joins across federatiom.
Both in terms of auth and not trying to fetch missing PDUs for invites, joins etc.
Diffstat (limited to 'synapse/handlers/federation.py')
-rw-r--r-- | synapse/handlers/federation.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index d8d5730b65..99655c8bb0 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -229,12 +229,6 @@ class FederationHandler(BaseHandler): @log_function @defer.inlineCallbacks def do_invite_join(self, target_host, room_id, joinee, content, snapshot): - hosts = yield self.store.get_joined_hosts_for_room(room_id) - if self.hs.hostname in hosts: - # We are already in the room. - logger.debug("We're already in the room apparently") - defer.returnValue(False) - pdu = yield self.replication_layer.make_join( target_host, room_id, @@ -268,7 +262,7 @@ class FederationHandler(BaseHandler): logger.debug("do_invite_join state: %s", state) - is_new_state = yield self.state_handler.annotate_event_with_state( + yield self.state_handler.annotate_event_with_state( event, old_state=state ) @@ -296,13 +290,13 @@ class FederationHandler(BaseHandler): yield self.store.persist_event( e, backfilled=False, - is_new_state=False + is_new_state=True ) yield self.store.persist_event( event, backfilled=False, - is_new_state=is_new_state + is_new_state=True ) finally: room_queue = self.room_queues[room_id] |