-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove --true
flag for unban
command
#653
Conversation
Signed-off-by: nexy7574 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just one tiny change for this one
src/commands/Unban.ts
Outdated
keywords: { | ||
keywordDescriptions: { | ||
true: { | ||
isFlag: true, | ||
}, | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably keep this, just in case someone does provide it and they get confused why draupnir now spits their command back out (draupnir will give them an error if they provide an unknown option).
Just add a comment above keywords:
saying
// This is a legacy option to unban the user from all rooms that we now ignore just so providing the option doesn't cause an error.
Signed-off-by: nexy7574 <[email protected]>
summary: | ||
"Removes an entity from a policy list. If the entity is a glob, then the flag --true must be provided to unban users matching the glob from all protected rooms.", | ||
summary: "Removes an entity from a policy list.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, now here this is problematic, we've not realised that --true
had dual purposes:
- The first is wholly terrible, which was to confirm that you wanted to unban users from all rooms
- The second isn't so bad, which is to make sure you understand you are using a glob. Similar to the kick command's
glob
option.
We probably do want that glob
option to be there and we can pretty much copy what the kick command does there. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok nah, that's wrong. Because the whole point of accepting globs is to remove policy rules, not unban users matching globs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message that the command sends to the management room afterwards unbans users matching a glob only because that's what it needs to do when a glob policy rule is removed
Closes #648 by making
--true
the default behaviour.