Open mrinmay7875 opened 3 years ago
A better idea would be giving a user ID to every user. If someone connects with a username for example "a" he will get a user ID. I will take the user id 123 for an example. Then , if he rejoins, with the same username, he should get the same ID. but if someone else joins, with the name "a" it should give him another user ID. For example 124. So thats a better way to do it.
As of now we can have more than one user in a chat room. So if in a chat room if there is more than one users having the same username and then anyone of them sends a message then it becomes difficult/impossible to identify who among them sent the message.
It would be better if we could implement the feature which wont allow the user to join with a username that is already being used by one of the users in that chatroom.