Skip to content

Latest commit

 

History

History
12 lines (12 loc) · 1.74 KB

TODO.md

File metadata and controls

12 lines (12 loc) · 1.74 KB
  • Add ability to set a password for a chat room.
  • At the moment, a user cannot see messages that is sent when he is not in a chat room the moment it is sent (because clients in chat rooms are not tracked in the database, but in-memory on the server).
  • Allow users to be part of multiple chat rooms (see above).
  • Add a server setting to purge old chat messages after a certain date (to avoid massive amounts of old messages)
  • Implement concept of a chat room admin/owner (and add ability to delete/rename chat room, kick/ban users)
  • Allow user to leave a chat in the client app
  • The chat room list in the client is not good (when it refreshes every 2 seconds the user selection is lost). To fix this do not clear the entire list when it is refreshed, but add only new chat rooms to the list on refresh.
  • Prevent users from registering a user with a empty username++
  • Add validation of messages on the server side (Not possible to implement)
  • The server code is probably not thread-safe (ConnectedClients map in server.go), we need to redisign the way we access the clients and currently connected users. Probably need to find a way to not have to use mutexes directly, but create some kind of abstraction to access the connected clients.
  • Separate validation from the server code to another file/package, and ensure that validation is being done server side for usernames, chat room names, chat messages etc...
  • Ensure that chat rooms and messages are being fetched from the database in a preffered order. For example maybe chat rooms should be listed in descending order according to number of users, then the timestamp etc... And chat messages must be listed according to the timestamp. This is currently not ensured in the server code.