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

bugFix : onboarding-31-days #1974

Open
6 of 10 tasks
joyguptaa opened this issue Mar 18, 2024 · 0 comments
Open
6 of 10 tasks

bugFix : onboarding-31-days #1974

joyguptaa opened this issue Mar 18, 2024 · 0 comments
Assignees

Comments

@joyguptaa
Copy link
Contributor

joyguptaa commented Mar 18, 2024

Issue Description

By default, every developer has the status "ONBOARDING" in the database once they join the Discord server. This onboarding status should ideally be removed within a month. If not, then we have a Discord role, i.e., group-onboarding-31d+, for it to be applied. There's a button on the status site to sync "onboarding 31d+" users, but it doesn't add that role to the matched user. The issue lies in the verification flow. Once the user runs the /verify command, we do not send the discordJoinedAt field, which is required for this role to be applied.

Phase 1

A quick fix would be to use a deprecated API which is /external-accounts/discord-sync which will store the discordJoinedAt into the user collection. It includes following things to be done:

  1. Instead of updating the entire user info, use specific query to update the specific user details.
Screenshot 2024-03-18 at 8 06 05 AM
  1. Update the test cases

Phase 2

The current solution is to fix the existing flow and add discordJoinedAt to the users who do not have this key. For this, it requires 2 things to be done

  1. Storing discordJoinedAt while generating the verification token
  2. Instead of providing discordId from frontend once the user authorises the discord bot, we should update the user details in backend itself.
Screenshot 2024-03-18 at 8 14 04 AM

Expected Behavior

  1. group-onboarding-31d+ should be applied to all the applicable users
  2. Updating user info once the verification is completed should be handled in backend instead of making PATCH API to /users/self route.

Current Behavior

  1. group-onboarding-31d+does not get applied to the applicable users
  2. my-site makes a PATCH request to /users/self with discordId in the body once the verification is completed. Updating users info based on data provided by the frontend is not recommended.

Screenshots

NA

Reproducibility

  • This issue is reproducible
  • This issue is not reproducible

Steps to Reproduce

  1. Create a fresh signup
  2. Run /verify command
  3. Verify your account using the same link
  4. Validate that discordJoinedAt is missing from user collection

Severity/Priority

  • Critical
  • High
  • Medium
  • Low

Additional Information

NA

Checklist

  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all the necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.
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

No branches or pull requests

1 participant