diff options
author | Daniel Wagner-Hall <dawagner@gmail.com> | 2015-10-16 15:23:30 +0100 |
---|---|---|
committer | Daniel Wagner-Hall <dawagner@gmail.com> | 2015-10-16 15:23:30 +0100 |
commit | e5acc8a47b3c535c121afb5fb58bc35bc26992ff (patch) | |
tree | 85755f9d0f088b4df0f984d302544f6ae18bdfc8 /synapse/federation/federation_client.py | |
parent | Merge pull request #309 from matrix-org/erikj/_filter_events_for_client (diff) | |
parent | Add signing host and keyname to signatures (diff) | |
download | synapse-e5acc8a47b3c535c121afb5fb58bc35bc26992ff.tar.xz |
Merge pull request #302 from matrix-org/daniel/3pidinvites
Implement third party identifier invites
Diffstat (limited to 'synapse/federation/federation_client.py')
-rw-r--r-- | synapse/federation/federation_client.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index f5e346cdbc..f5b430e046 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -25,6 +25,7 @@ from synapse.api.errors import ( from synapse.util import unwrapFirstError from synapse.util.caches.expiringcache import ExpiringCache from synapse.util.logutils import log_function +from synapse.util import third_party_invites from synapse.events import FrozenEvent import synapse.metrics @@ -356,14 +357,19 @@ class FederationClient(FederationBase): defer.returnValue(signed_auth) @defer.inlineCallbacks - def make_join(self, destinations, room_id, user_id): + def make_join(self, destinations, room_id, user_id, content): for destination in destinations: if destination == self.server_name: continue + args = {} + if third_party_invites.join_has_third_party_invite(content): + args = third_party_invites.extract_join_keys( + content["third_party_invite"] + ) try: ret = yield self.transport_layer.make_join( - destination, room_id, user_id + destination, room_id, user_id, args ) pdu_dict = ret["event"] |