Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #609 from RocketChat/feature/rest-api-message-read…
Browse files Browse the repository at this point in the history
…-receipts

[NEW] Added docs for chat.getMessageReadReceipts endpoint
  • Loading branch information
MartinSchoeler authored Mar 29, 2018
2 parents 571c704 + 37fc827 commit a426db3
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 13 deletions.
1 change: 1 addition & 0 deletions _data/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@
- Chat:
- delete
- getMessage
- getMessageReadReceipts
- pinMessage
- postMessage
- react
Expand Down
1 change: 1 addition & 0 deletions contributing/documentation/documentation-map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ Here you can also find what articles are incomplete and missing.
- Chat:
- delete
- getMessage
- getMessageReadReceipts
- pinMessage
- postMessage
- react
Expand Down
27 changes: 14 additions & 13 deletions developer-guides/rest-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,20 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and

### Chat

| Url | Short Description | Details Page |
| :--------------------------- | :--------------------------------------------------------------- | :-------------------------- |
| `/api/v1/chat.delete` | Deletes an existing chat message. | [Link](chat/delete/) |
| `/api/v1/chat.getMessage` | Retrieves a single chat message. | [Link](chat/getmessage/) |
| `/api/v1/chat.pinMessage` | Pins a chat message to the message's channel. | [Link](chat/pinmessage/) |
| `/api/v1/chat.postMessage` | Posts a new chat message. | [Link](chat/postmessage/) |
| `/api/v1/chat.react` | Sets/unsets the user's reaction to an existing chat message. | [Link](chat/react/) |
| `/api/v1/chat.search` | Search for messages in a channel. | [Link](chat/search/) |
| `/api/v1/chat.starMessage` | Stars a chat message for the authenticated user. | [Link](chat/starmessage/) |
| `/api/v1/chat.sendMessage` | Send new chat message. | [Link](chat/sendmessage/) |
| `/api/v1/chat.unPinMessage` | Removes the pinned status of the provided chat message. | [Link](chat/unpinmessage/) |
| `/api/v1/chat.unStarMessage` | Removes the star on the chat message for the authenticated user. | [Link](chat/unstarmessage/) |
| `/api/v1/chat.update` | Updates the text of the chat message. | [Link](chat/update/) |
| Url | Short Description | Details Page |
| :------------------------------------ | :--------------------------------------------------------------- | :-------------------------------------- |
| `/api/v1/chat.delete` | Deletes an existing chat message. | [Link](chat/delete/) |
| `/api/v1/chat.getMessage` | Retrieves a single chat message. | [Link](chat/getmessage/) |
| `/api/v1/chat.pinMessage` | Pins a chat message to the message's channel. | [Link](chat/pinmessage/) |
| `/api/v1/chat.postMessage` | Posts a new chat message. | [Link](chat/postmessage/) |
| `/api/v1/chat.react` | Sets/unsets the user's reaction to an existing chat message. | [Link](chat/react/) |
| `/api/v1/chat.search` | Search for messages in a channel. | [Link](chat/search/) |
| `/api/v1/chat.starMessage` | Stars a chat message for the authenticated user. | [Link](chat/starmessage/) |
| `/api/v1/chat.sendMessage` | Send new chat message. | [Link](chat/sendmessage/) |
| `/api/v1/chat.unPinMessage` | Removes the pinned status of the provided chat message. | [Link](chat/unpinmessage/) |
| `/api/v1/chat.unStarMessage` | Removes the star on the chat message for the authenticated user. | [Link](chat/unstarmessage/) |
| `/api/v1/chat.update` | Updates the text of the chat message. | [Link](chat/update/) |
| `/api/v1/chat.getMessageReadReceipts` | Retrieves message read receipts. | [Link](chat/getmessagereadreceipts/) |

### IM

Expand Down
1 change: 1 addition & 0 deletions developer-guides/rest-api/chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
| `/api/v1/chat.unPinMessage` | Removes the pinned status of the provided chat message. | [Link](unpinmessage/) |
| `/api/v1/chat.unStarMessage` | Removes the star on the chat message for the authenticated user. | [Link](unstarmessage/) |
| `/api/v1/chat.update` | Updates the text of the chat message. | [Link](update/) |
| `/api/v1/chat.getMessageReadReceipts` | Retrieves message read receipts. | [Link](getmessagereadreceipts/) |
49 changes: 49 additions & 0 deletions developer-guides/rest-api/chat/getmessagereadreceipts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Get Message Read Receipts

Retrieve message read receipts.

| URL | Requires Auth | HTTP Method |
| :--- | :--- | :--- |
| `/api/v1/chat.getMessageReadReceipts` | `yes` | `GET` |

## Query Parameters

| Argument | Example | Required | Description |
| :--- | :--- | :--- | :--- |
| `messageId` | `ByehQjC44FwMeiLbX` | Required | The message id |

## Example Call

```bash
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/chat.getMessageReadReceipts?messageId=ByehQjC44FwMeiLbX
```

## Example Result

```json
{
"receipts": [
{
"_id": "HksCYdTpCiM9DZ7Sa",
"roomId": "GENERAL",
"userId": "nvw6PBrXTejp4sfQt",
"messageId": "WyDsZzjk2wHogtWK2",
"ts": "2018-02-26T20:34:03.907Z",
"user": {
"username": "rocket.cat",
"name": "Rocket cat",
"_id": "nvw6PBrXTejp4sfQt"
}
}
],
"success": true
}
```

## Change Log

| Version | Description |
| :--- | :--- |
| 0.63.0 | Added |

0 comments on commit a426db3

Please sign in to comment.