Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MESSAGES] Get list of conversations #963

Open
Clm-Roig opened this issue Aug 7, 2022 · 0 comments
Open

[MESSAGES] Get list of conversations #963

Clm-Roig opened this issue Aug 7, 2022 · 0 comments

Comments

@Clm-Roig
Copy link
Member

Clm-Roig commented Aug 7, 2022

Who can do it

Any user, only for its own conversations (as both recipient and sender)

New rights to add to the database:
Messages - View own

Dependant on issues

Mandatory ➡️ #960

Feature description

Retrieve all user's conversations, including :

  • other user id
  • other user nickname
  • last message sent date

A conversation doesn't include the messages (see Response below).

Route & body

GET /api/v1/conversations

Response

{
  "conversations": [{
    "caver": {
        "id": 1,
        "nickname": "johnDoe"
    },
    "lastMessageSentDate": "2022-03-05T13:42:33.071Z"
  }, {
    "caver": {
        "id": 2,
        "nickname": "alice42"
    },
    "lastMessageSentDate": "2022-02-05T18:20:31.135Z"
  }]
}
@urien urien assigned Clm-Roig and unassigned Clm-Roig Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant