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 messages sent with another user #967

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

[MESSAGES] Get messages sent with another user #967

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

Comments

@Clm-Roig
Copy link
Member

Clm-Roig commented Aug 12, 2022

Who can do it

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

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

Dependent on issues

Mandatory ➡️ #960

Feature description

  • Retrieve latest XX messages with the user (paginated route) with a date parameter.

Route & body

GET /api/v1/users/:userId/messages?from=0&size=50&date="2012-03-08T05:10:58+05:30"

Response

{
  "messages": [{
    "id": 1,
    "dateInscription": "2022-02-05T18:20:31.135Z",
    "body": "Hi John",
    "sender": 2
  },
  {
    "id": 2,
    "dateInscription": "2022-02-05T18:21:31.135Z",
    "body": "Hello Alice, how are you?",
    "sender": 1
  },
  {
    "id": 3,
    "dateInscription": "2022-02-05T18:22:31.135Z",
    "body": "Fine thanks and you?",
    "sender": 2
  }]
}

Which will be seen on the GUI by "John" (caver with id 1) as, for example:

image

@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