Make admin api redactions use the requester to send the redaction (#18029)

This commit is contained in:
morguldir
2024-12-23 11:19:35 +00:00
committed by GitHub
parent d69c00b5a1
commit 7c2284b2f2
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
Fix a bug preventing the admin redaction endpoint from working on messages from remote users.
+1 -1
View File
@@ -473,7 +473,7 @@ class AdminHandler:
"type": EventTypes.Redaction,
"content": {"reason": reason} if reason else {},
"room_id": room,
"sender": user_id,
"sender": requester.user.to_string(),
}
if room_version.updated_redaction_rules:
event_dict["content"]["redacts"] = event.event_id