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

Implement MSC2174: move redacts to a content property. #15395

Merged
merged 4 commits into from
Apr 13, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Lint
  • Loading branch information
clokep committed Apr 13, 2023
commit dbab49cf791757dcfbea0ae60c45389541dc4295
6 changes: 5 additions & 1 deletion synapse/rest/client/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,11 @@ async def _do(
room_version = await self._store.get_room_version(room_id)
if room_version.msc2176_redaction_rules:
if "redacts" in content and content["redacts"] != event_id:
raise SynapseError(400, "Cannot provide a redacts value incoherent with the event_id of the URL parameter", Codes.INVALID_PARAM)
raise SynapseError(
400,
"Cannot provide a redacts value incoherent with the event_id of the URL parameter",
Codes.INVALID_PARAM,
)
else:
content["redacts"] = event_id

Expand Down