Subject:

Designing a usernameless chat system


Date: Message-Id: https://www.5snb.club/posts/2023/usernameless-chat/

Discord is removing username discriminators, which got me thinking about usernames as a whole, and how to design a platform without them.

This post is written with discord in mind, but applies to basically any chat platform.

The only place where a user needs to interact with a username in discord is when adding a user as a friend. And discord already has a form of invite links, it just uses it to join servers rather than to invite users.

You could nuke usernames entirely. Users still have a unique identifier as normal, but that’s internal-only and not intended for use by anyone but discord and bots. Making user IDs private would be a good idea, but not the focus here. And have a display name which doesn’t have to be unique.

Now that usernames are gone, you need to have some way to add users. So introduce friend codes.

Friend codes act much like invite links to servers, in that they’re random codes that last for a specified length of time and uses, both of which can be infinite.

Codes should be human readable, writable, and memorable. People are shit with random letters, so instead make them words. 3 random words from a wordlist of 10000 gives you 10000³ possible codes, which is enough for 500 million users to have 2000 codes each. Therefore, a code would look like crude holders temp. You may also wish to use a wordlist that can correct for typos, and autocorrect on entry.

Codes should also be able to be in the user’s native language. This not only means people aren’t forced to memorise codes in English when they don’t speak it, but it also helps lower the usage of any specific wordlist, allowing more common words to be used.

The number of words in the wordlist doesn’t have to be fixed upfront, and can be changed on the fly. Shorter and more common words can be used for longer term codes, while longer words are used for temporary codes.

The use case of “I want someone to add me but I don’t have my phone with me” would be handled by encouraging generation of one permanent invite code. Depending on how many users use your system, this could be shortened to 2 words (100 million total codes with a wordlist of 10000). This is the closest thing to a username that this system would have, but is both not user selectable, and entirely optional. You would need to memorise the code, but in the current system you need to memorise your discriminator anyways, so no major difference. You can also very easily replace that invite code without affecting any other invite links, if it is being used to spam you.

Give the ability to give a name to codes, so you can have codes tied to a specific platform you put the code on. When you get a friend request, you’re told where the user got your code from, and you’re given the chance to revoke that code easily.

This change would mean that for every friend request you get, you’re able to know where it came from, and are given the ability to revoke it. You can also add a friend based on seeing a message from a user and clicking “Add Friend”. You should have the ability to be told which server the user added you from, and have the ability to block friend requests from that server.

If you have adding friend requests from servers disabled, and have no active invite links, there is no way for anyone to add you as a friend.

The above system both fixes issues with username squatting, and helps deal with spam issues where you can be told where someone added you from. No more message requests with Funny Images or death threats from randos. Or, at least, you can know how they know you.

This also works for federated systems, but you would need to add a server name to the invite codes, so codes would look like chat.5snb.club/sims bank tough. Bikeshed if you want a - instead of space there. And federated systems would likely use shorter codes because less users per server.