0xStation / proposer

1 stars 0 forks source link

Allow user to connect to discord to display discord handle #722

Closed kristencheung closed 1 year ago

kristencheung commented 1 year ago

What's included in this pr + description

loom demo: https://www.loom.com/share/26e9182e263642adb6bcc4ae77727dd3

The goal of this pr is to add discord handles to a user's profile so that people have a means of contacting each other.

I added the discord handle to the AccountMediaObject which already includes the pfp + address/ens.

image image image image

To support discord connection, I added the discord connection code that was part of member directory.

Motivation & context

Alli from foxes asked for a way to contact contributors who are proposing to the foxes rfps.

image

The ideal use case for them is to have an input on the proposal form itself be a required field, but in reality it would most likely need to be that discord connection is a required step within the proposal. That's doable, but can come after this pr.

Steps to test

  1. This only runs on localhost right now because I haven't performed migrations on staging
  2. Connect your wallet and visit your workspace settings
  3. Connect to Discord
  4. Your discord handle should now appear next to your pfp
  5. If you don't have a display name or ens, your discord username should now be your display name. likewise, with your pfp, if you don't have one, it will be populated by the discord pfp

Outstanding issues

A majority of this pr is adding back old code from member directory days. Additionally, I added back the discordId on the Account object, but instead of it being an Int it's now a String and it's no longer unique in case a single account with many addresses wants to use the same discord id. Let me know if there are any issues with that!

Relevant docs

The api we're calling to get the user object from discord https://discord.com/developers/docs/resources/user#user-object

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
web ✅ Ready (Inspect) Visit Preview Oct 27, 2022 at 9:16PM (UTC)