86 lines
2.1 KiB
Markdown
86 lines
2.1 KiB
Markdown
```
|
|
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)
|
|
-
|
|
|
|
|