diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-11-11 15:47:47 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-11-11 15:47:47 +0000 |
commit | 4c131b2c78bae793509bea776107a8183274a709 (patch) | |
tree | 7dedc9069145c01dd4039b86f28e7d5a30350816 /synapse/federation/transport/client.py | |
parent | Merge pull request #6340 from matrix-org/babolivier/pagination_query (diff) | |
download | synapse-4c131b2c78bae793509bea776107a8183274a709.tar.xz |
Implement v2 API for send_join
Diffstat (limited to 'synapse/federation/transport/client.py')
-rw-r--r-- | synapse/federation/transport/client.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py index 920fa86853..ba68f7c0b4 100644 --- a/synapse/federation/transport/client.py +++ b/synapse/federation/transport/client.py @@ -267,7 +267,7 @@ class TransportLayerClient(object): @defer.inlineCallbacks @log_function - def send_join(self, destination, room_id, event_id, content): + def send_join_v1(self, destination, room_id, event_id, content): path = _create_v1_path("/send_join/%s/%s", room_id, event_id) response = yield self.client.put_json( @@ -278,6 +278,17 @@ class TransportLayerClient(object): @defer.inlineCallbacks @log_function + def send_join_v2(self, destination, room_id, event_id, content): + path = _create_v2_path("/send_join/%s/%s", room_id, event_id) + + response = yield self.client.put_json( + destination=destination, path=path, data=content + ) + + return response + + @defer.inlineCallbacks + @log_function def send_leave(self, destination, room_id, event_id, content): path = _create_v1_path("/send_leave/%s/%s", room_id, event_id) |