diff --git a/changelog.d/18029.bugfix b/changelog.d/18029.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..f7036fe9fc033cbde5216fc1d1d3e69aeb098dbb --- /dev/null +++ b/changelog.d/18029.bugfix @@ -0,0 +1 @@ +Fix a bug preventing the admin redaction endpoint from working on messages from remote users. diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py index d1194545aeb65272777ac95e4cc75500f89c1e23..f3e7790d43529116fbc5eadb956c1f2c7482bdd6 100644 --- a/synapse/handlers/admin.py +++ b/synapse/handlers/admin.py @@ -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