diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-09-19 12:18:01 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-09-19 12:20:36 +0100 |
commit | 2eabdf3f9860c78598d026574807da463bf40f2e (patch) | |
tree | 2278319dd742c08b70725649a5c44e5c3eefdaf6 /synapse/handlers/federation.py | |
parent | PoC for filtering spammy events (#2456) (diff) | |
download | synapse-2eabdf3f9860c78598d026574807da463bf40f2e.tar.xz |
add some comments to on_exchange_third_party_invite_request
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/federation.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 4669199b2d..2637f41dcd 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -2090,6 +2090,14 @@ class FederationHandler(BaseHandler): @defer.inlineCallbacks @log_function def on_exchange_third_party_invite_request(self, origin, room_id, event_dict): + """Handle an exchange_third_party_invite request from a remote server + + The remote server will call this when it wants to turn a 3pid invite + into a normal m.room.member invite. + + Returns: + Deferred: resolves (to None) + """ builder = self.event_builder_factory.new(event_dict) message_handler = self.hs.get_handlers().message_handler @@ -2108,9 +2116,12 @@ class FederationHandler(BaseHandler): raise e yield self._check_signature(event, context) + # XXX we send the invite here, but send_membership_event also sends it, + # so we end up making two requests. I think this is redundant. returned_invite = yield self.send_invite(origin, event) # TODO: Make sure the signatures actually are correct. event.signatures.update(returned_invite.signatures) + member_handler = self.hs.get_handlers().room_member_handler yield member_handler.send_membership_event(None, event, context) |