Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix M_WRONG_ROOM_KEYS_VERSION error not including current_version field #11988

Merged
merged 3 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/11988.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix M_WRONG_ROOM_KEYS_VERSION errors not including the specced current_version field.
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions synapse/api/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ def __init__(self, current_version: str):
super().__init__(403, "Wrong room_keys version", Codes.WRONG_ROOM_KEYS_VERSION)
self.current_version = current_version

def error_dict(self) -> "JsonDict":
return cs_error(self.msg, self.errcode, current_version=self.current_version)


class UnsupportedRoomVersionError(SynapseError):
"""The client's request to create a room used a room version that the server does
Expand Down