diff options
author | Erik Johnston <erikj@jki.re> | 2019-01-25 10:27:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-25 10:27:25 +0000 |
commit | 28c21cd578587a1890ebf739fde94b2375cb4429 (patch) | |
tree | 69514e969311bdee344e51a524969c73c0fdb066 /synapse/federation/federation_server.py | |
parent | Merge pull request #4469 from matrix-org/revert-4451-erikj/require_format_ver... (diff) | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/msc_1813 (diff) | |
download | synapse-28c21cd578587a1890ebf739fde94b2375cb4429.tar.xz |
Merge pull request #4447 from matrix-org/erikj/msc_1813
Implement MSC 1813 - Add room version to make APIs
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r-- | synapse/federation/federation_server.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index cb729c69ea..dde166e295 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -400,8 +400,14 @@ class FederationServer(FederationBase): origin_host, _ = parse_server_name(origin) yield self.check_server_matches_acl(origin_host, room_id) pdu = yield self.handler.on_make_leave_request(room_id, user_id) + + room_version = yield self.store.get_room_version(room_id) + time_now = self._clock.time_msec() - defer.returnValue({"event": pdu.get_pdu_json(time_now)}) + defer.returnValue({ + "event": pdu.get_pdu_json(time_now), + "room_version": room_version, + }) @defer.inlineCallbacks def on_send_leave_request(self, origin, content): |