started edition of chat in node

+ handled cors
+ added css fo chat scroll and newline
This commit is contained in:
lenovo
2022-11-30 14:25:57 +01:00
parent b86f4aa0c7
commit 55f77d2259
14 changed files with 483 additions and 81 deletions

85
tests_hugo/README.md Normal file
View File

@@ -0,0 +1,85 @@
```
fetch conversations
___________________
| _ |
| no conversation | if len == 0
| |
| [join public] |
| |
| [start new] |
| |
|...................|
| |
|___________________|
___________________
| convs _ |
|___________________| if len > 0
| |
| |
| |
| |
| |
|___________________|
| |send |
|_____________|_____|
___________________
| convs _ |
|_ ____________|
| .list |
| .of |
| .convs |
| |
| |
|___________________|
| |send |
|_____________|_____|
___________________
| [join public] _ |
| | if join_public
| .list | fetch public_conversations
| .of |
| .public |
| .convs |
| |
| |
| |
|___________________|
___________________
| [start new] _ |
| | if start_new
| .list | fetch friends
| .of |
| .friends |
| |
| |
| |
| |
|___________________|
___________________
| convs _ |
|___________________| if click_on_list_element
| .blablabla | fetch conversation(list_element)
| blablabla. |
| .bla | --server side--
| blabla. | if conversation_exist
| bla. | return text
|___________________| else if is_allowed
| |send | return "start conv"
|_____________|_____|
```
### goals :
- own messages are not sent to myself and directly printed
- i can create a room
- my messages are sent to other people in room
- i can choose in which room to send the messages
### routes :
- https://transcendance:8080/api/v2/chat/conversations
- returns list of objects, each object contains :
- id: unique conv identification
- title: name of the conversation (name of other guy if direct message)
-