Skip to content

Commit 7c2284b

Browse files
authored
Make admin api redactions use the requester to send the redaction (#18029)
1 parent d69c00b commit 7c2284b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/18029.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a bug preventing the admin redaction endpoint from working on messages from remote users.

synapse/handlers/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ async def _redact_all_events(
473473
"type": EventTypes.Redaction,
474474
"content": {"reason": reason} if reason else {},
475475
"room_id": room,
476-
"sender": user_id,
476+
"sender": requester.user.to_string(),
477477
}
478478
if room_version.updated_redaction_rules:
479479
event_dict["content"]["redacts"] = event.event_id

0 commit comments

Comments
 (0)