server icon indicating copy to clipboard operation
server copied to clipboard

Implement Pomelo

Open Puyodead1 opened this issue 2 years ago • 4 comments

The Pomelo project is the code name for Discords new naming system. Pomelo removes the use of discriminators and introduces new, unique usernames (@username) and display names.

The official API docs are still being written, so all changes are based on information the below articles, observing changes in the Discord API, and the partial WIP docs.

  • [x] global_name user property
  • [x] Add Config option (uniqueUsernames)
  • [x] Update user modify route
  • [ ] Auto migration

References:

  • https://discord.com/blog/usernames
  • https://support.discord.com/hc/en-us/articles/12620128861463
  • https://support-dev.discord.com/hc/en-us/articles/13667755828631
  • https://github.com/discord/discord-api-docs/pull/6218

Puyodead1 avatar May 05 '23 15:05 Puyodead1

global_name field is the display name. Usernames are going to still use the username field (see discord docs PR https://github.com/discord/discord-api-docs/pull/6130/files/9a162cf08604dc39b10d65f715ed1d87b6b52678#diff-39e6aeaafba5726f3fb409da21a6953dfb679480f09038a0d05f4dd93e89e074)

~~Not according to the stuff I've read, global name is the handle and username is the display name.~~ huh, ok. I looked at the docs again and I guess I read incorrectly or something?

I also found that docs pr after I wrote this, I'll have to remove the display_name property since it doesn't seem like it's going to be used.

Puyodead1 avatar May 06 '23 04:05 Puyodead1

/users/@me/pomelo
/users/@me/pomelo-attempt

Those are only going to be used during migration; in spacebar, we might instead want to do an automated migration to unique names.

  • [ ] #1051

erkinalp avatar May 06 '23 04:05 erkinalp

from @Puyodead1:

we should also think about what we're going to do about switching back and forth, like if someone has an instance already and then decides to switch to pomelo, and then turns it off again.

I still think this should be allowed, but without full round-tripping compatibility. Discriminators to unique usernames is already a lossy conversion in itself.

erkinalp avatar Dec 26 '23 12:12 erkinalp

from @Puyodead1:

we should also think about what we're going to do about switching back and forth, like if someone has an instance already and then decides to switch to pomelo, and then turns it off again.

I still think this should be allowed, but without full round-tripping compatibility. Discriminators to unique usernames is already a lossy conversion in itself.

No it's not? As I said in discord, we can just simply not delete discriminators from the db,and with legacy username (users without one could just keep what they have)

Puyodead1 avatar Dec 26 '23 13:12 Puyodead1