Merge pull request #4482 from matrix-org/erikj/event_auth_room_version

Pass through room version to event auth
This commit is contained in:
Erik Johnston 2019-01-28 20:09:38 +00:00 committed by GitHub
commit f1a04462eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 71 additions and 28 deletions

View file

@ -123,7 +123,10 @@ class RoomCreationHandler(BaseHandler):
token_id=requester.access_token_id,
)
)
yield self.auth.check_from_context(tombstone_event, tombstone_context)
old_room_version = yield self.store.get_room_version(old_room_id)
yield self.auth.check_from_context(
old_room_version, tombstone_event, tombstone_context,
)
yield self.clone_existing_room(
requester,