From 45c8189dbcf9d4638b669eaea8bc0c1901cdaf3a Mon Sep 17 00:00:00 2001 From: gnuxie Date: Sat, 22 Mar 2025 13:46:29 +0000 Subject: [PATCH] Add option to send takedown for plain-text entities. --- src/commands/Takedown.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/commands/Takedown.tsx b/src/commands/Takedown.tsx index 1c897aa4..eada0010 100644 --- a/src/commands/Takedown.tsx +++ b/src/commands/Takedown.tsx @@ -142,6 +142,11 @@ export const DraupnirTakedownCommand = describeCommand({ description: "Runs the command without the preview of the unban and the confirmation prompt.", }, + "plain-text": { + isFlag: true, + description: + "Creates a plain-text version of the policy rather than masking the entity with SHA256. There are not many reason to do this other than compatibility with other tools.", + }, }, }, async executor( @@ -220,10 +225,11 @@ export const DraupnirTakedownCommand = describeCommand({ detailsProvider ); } + const plainText = keywords.getKeywordValue("plain-text", false); return await policyRoomEditor.takedownEntity( preview.ok.ruleType, preview.ok.entity, - {} + { shouldHash: !plainText } ); }, });