Skip to content
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

Add a verification system #209

Closed
wants to merge 30 commits into from
Closed

Add a verification system #209

wants to merge 30 commits into from

Conversation

dericksonmark
Copy link
Member

@dericksonmark dericksonmark commented May 28, 2021

Purpose

Add a verification system! Implements #98.

Approach

To verify their account, a member will need to:

  1. Send !jira verify (MojiraBot will send them a 15 character token)
  2. Comment on a specific Mojira ticket with their token
  3. Send a private message to the bot with link <jira username>

The bot will check the ticket for their comment, and if the username and code matches, the accounts will be linked.

This also adds:

  • A command !jira who or !jira whois to check the account linked to either a Mojira or a Discord account.
  • A method to remove the verification role from a user temporarily, by reacting to the log message.
  • A method to remove the verification link from a user, by reacting to the log message with ✂.

Future work

dericksonmark and others added 13 commits May 28, 2021 08:11
Fetching messages at startup, mostly, and improvements to embed creation.
In case the user copy-and-pastes the token from the embed into the comment field under Visual mode, the boldness is copied too. Removing the asterisks fixes this problem.
In case this role ever gives access to extra channels, and the user uses the access incorrectly, it is possible to remove the role from them temporarily (or permanently, if you want it to). Also, this includes a very important fix to adding the Verified role initially.
Simply react to the verification log embed with ✂, and MojiraBot will delete the message, removing the account link.
Previously, VerificationMessageEventHandler read directly from the channel. Now, it reads from the cache, saving time and resources.
Previously, a user who had their verification temporarily removed could run !jira verify again to create a second log message, potentially causing problems. Now, running !jira verify also checks the log channel for a verification, preventing this.
Changed from forEach loop to for loop, to save time.
It's nice to know that the link is correct.
@dericksonmark
Copy link
Member Author

I think this is as complete as I'm going to get it, so I am marking this pull request as ready for review.

@dericksonmark dericksonmark marked this pull request as ready for review June 1, 2021 04:47
@dericksonmark dericksonmark linked an issue Jun 1, 2021 that may be closed by this pull request
@violine1101 violine1101 self-requested a review June 1, 2021 21:17
@chandler05
Copy link
Member

Looks like the team is in favor of adding this according to https://discord.com/channels/647810384031645728/647810521713606656/850795026674089985

@dericksonmark dericksonmark marked this pull request as draft January 8, 2022 03:47
@dericksonmark
Copy link
Member Author

I've decided to close this for now. When creating this, I made many choices that are inefficient for the bot, like storing verifications in a Discord channel. After the jira.js and discord.js pull requests are merged, I plan to remake this in a more efficient way. :)

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.

Implement user verification process
4 participants