@ -51,15 +51,22 @@ But there is a twist. If some user creates a post, that post has to be created t
#### Private Messages
Users will be able to send private messages to each other, so you will need :
Users will be able to send private messages to each other, so you will need to create a chat, where it will exist :
- A section of the site to show who is online and able to talk to.
- A section to show who is online and able to talk to:
- This section must be organized by the last message sent (just like discord), if the user is new and does not present messages you must organize it in alphabetic order.
- The user must be able to send private messages to the users who are online
- A section of the site that shows the people that the user already texted or that texted the user
- This sections must be visible at all times, in every pages.
Both of these sections must be visible at all times, in every pages.
- A section that when clicked on the user that you want to send a message, reloads the past messages. Messages that where already sent:
- For this you will have to be able to see the previous messages that you had with the user
- Reload the 10 last messages and when scrolled up to see more messages you must provide the user with 10 more messages. **Do not forget what you learned!! (`Throttle`, `Debounce`)**
As it is expected, the messages should work on real time, in other words, if a user sends a message, the other user should receive the notification of the new message without refreshing the page. Again this is possible through the use of WebSockets.
- Messages must have a specific format:
- A **`date`** that shows when the message was sent
- The **`user name`**, that identifies the user that sent the message
As it is expected, the messages should work in real time, in other words, if a user sends a message, the other user should receive the notification of the new message without refreshing the page. Again this is possible through the usage of WebSockets in backend and frontend.
###### Is there a section designed to show online users?
###### Is there a section designed to show the people that the user texted or texted the user?
###### Are the chat users organized by last message sent (just like discord)?
##### Try and register a new user that does not have chat messages.
###### Are the chat users organized in alphabetic order?
##### Try to send a message
###### Does the message respect the format, by using the users name and the date that the message was sent?
##### Open two browsers (ex: Chrome and Firefox), log in with different users in each one and with one of them try to send a private message to the other.
###### Did the other user received the message in real time, without refreshing the page?
##### Open two browsers (ex: Chrome and Firefox), log in with different users in each one and with one of them try to send a private message to the other.
###### Did the other user received a notification?
##### Try to open a private conversation, that has more then 10 messages.
###### Is the last 10 messages sent to this user loaded for you to see?
##### Try to open a private conversation, that has more then 20 messages and scroll up to see the rest of the conversation.
###### Does it use the scroll event to load more messages?
##### Try to open a private conversation, that has more then 20 messages and scroll up to see the rest of the conversation.
###### Does it load just 10 messages, without spamming the scroll event (This can be done using the function [Throttle](https://css-tricks.com/debouncing-throttling-explained-examples/#throttle))?
##### Check the project code.
###### Do you see the use of WebSockets?
###### Do you see the usage of WebSockets?
#### Bonus
@ -73,3 +97,5 @@
###### +Can the users add a photo to their profile?
###### +Can the users send images through the private messages?
###### +Is the code using synchronicity (Promises and goroutines/channels) to increase performance?