Skip to content

policyeval/commands: Add "redact user" shortcut in deactivate command#56

Open
timedoutuk wants to merge 4 commits into
mainfrom
nexy7574/deactivate-redact-user
Open

policyeval/commands: Add "redact user" shortcut in deactivate command#56
timedoutuk wants to merge 4 commits into
mainfrom
nexy7574/deactivate-redact-user

Conversation

@timedoutuk

Copy link
Copy Markdown
Collaborator

Idea inspired by synapse-admin's similar functionality

depends on mautrix/go#466

Idea inspired by synapse-admin's similar functionality
completed -> complete
@timedoutuk
timedoutuk marked this pull request as ready for review February 28, 2026 19:16
@timedoutuk
timedoutuk requested a review from tulir February 28, 2026 19:16
Comment thread policyeval/commands.go
}, {
Key: "redact",
Schema: cmdschema.PrimitiveTypeBoolean.Schema(),
}, {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing Optional: true

Comment thread policyeval/commands.go
}
case "failed", "cancelled":
ce.Reply("User redaction task failed.")
default:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default:
case "active":

Comment thread policyeval/commands.go
if args.Redact {
task, err := ce.Meta.Bot.SynapseAdmin.RedactUser(ce.Ctx, args.UserID, synapseadmin.ReqRedactUser{})
if err != nil {
ce.Reply("Failed to start user redaction task: %v", err)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ce.Reply("Failed to start user redaction task: %v", err)
ce.Reply("Failed to start user redaction task: %v", err)
return

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants