Skip to content

Manual verification with !verify sends the user the confirmation DM.#1328

Merged
ks129 merged 8 commits into
masterfrom
swfarnsworth/developer_command
Dec 24, 2020
Merged

Manual verification with !verify sends the user the confirmation DM.#1328
ks129 merged 8 commits into
masterfrom
swfarnsworth/developer_command

Conversation

@swfarnsworth
Copy link
Copy Markdown
Contributor

Previously, users wouldn't get the DM from the bot that one usually gets when they verify if a moderator verifies them manually. This PR solves this.

Per @Den4200's request, the response from the bot also mentions the user rather than stating their account name.

`ALTERNATE_VERIFIED_MESSAGE` now begins "You're now verified!" instead
of "Thanks for accepting our rules!".
Previously, responses from the bot would say the name of the user rather
than mentioning them.
@ghost ghost added the needs 2 approvals label Dec 18, 2020
@swfarnsworth swfarnsworth added the a: moderation Related to community moderation functionality: (moderation, defcon, verification) label Dec 18, 2020
@coveralls
Copy link
Copy Markdown

coveralls commented Dec 18, 2020

Coverage Status

Coverage decreased (-0.004%) to 56.547% when pulling 68cbca0 on swfarnsworth/developer_command into 1c7971d on master.

@swfarnsworth swfarnsworth marked this pull request as draft December 20, 2020 16:39
@swfarnsworth
Copy link
Copy Markdown
Contributor Author

I didn't realize the native gate rollout was imminent when making this PR. I'll submit a new version that checks if the user is pending, and if not, assigns and subsequently removes the developer role. I'll probably also rename the function accordingly.

Renamed method; if not `user.pending`, adds and immediately removes an arbitrary role (namely the Announcements role), which verifies the user.
@swfarnsworth swfarnsworth marked this pull request as ready for review December 23, 2020 01:35
Copy link
Copy Markdown
Contributor

@Xithrius Xithrius left a comment

Choose a reason for hiding this comment

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

Besides this one line in the ALTERNATE_VERIFIED_MESSAGE docstring that may need to be changed, everything looks good to me.

Comment thread bot/exts/moderation/verification.py Outdated
Copy link
Copy Markdown
Contributor

@Xithrius Xithrius left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread bot/exts/moderation/verification.py Outdated
This was a logic error. This functionality is unfortunately difficult to test outside of production.
@swfarnsworth swfarnsworth requested a review from ks129 December 24, 2020 15:36
@ks129 ks129 merged commit a5f09a8 into master Dec 24, 2020
@ks129 ks129 deleted the swfarnsworth/developer_command branch December 24, 2020 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: moderation Related to community moderation functionality: (moderation, defcon, verification)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants