User names that have been updated with Discord's new username policy will show a trailing "#0" after the name of the event author on posted events and when creating events.
To Reproduce
Steps to reproduce the behavior:
Have a username that does not include a Discord tag/discriminator.
Create an event.
When creating or displaying the event the event author will show with a trailing "#0"
Splitting displayName at the "#" symbol and examining the length of the second element could be enough. If the second element does not consist of a four-digit discriminator, we can exclude showing the "#" symbol and number on the affected pages.
Describe the bug
User names that have been updated with Discord's new username policy will show a trailing "#0" after the name of the event author on posted events and when creating events.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The username should be consistent with Discord.
Screenshots
Which Branch should this fix be Pulled into?
PR into [branchName]
Device Information
N/A
Additional context
This appears to be normal behavior on Discord's part: https://discord.com/developers/docs/change-log#identifying-migrated-users
Names seem to be stored in the Together database as a string with the Discord tag attached. https://github.com/Together-100Devs/Together/blob/951a6d8a5c667e8dd854ad30e95be24dd2af2abc/server/config/passport.js#L30
https://github.com/Together-100Devs/Together/blob/951a6d8a5c667e8dd854ad30e95be24dd2af2abc/server/config/passport.js#L44-L62
Splitting
displayName
at the "#" symbol and examining the length of the second element could be enough. If the second element does not consist of a four-digit discriminator, we can exclude showing the "#" symbol and number on the affected pages.