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

Document chat.ignoreUser API endpoint #1149

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _data/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@
- unPinMessage
- unStarMessage
- update
- ignoreUser
- Commands:
- get
- list
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 @@ -312,6 +312,7 @@ Here you can also find what articles are incomplete and missing.
- unPinMessage
- unStarMessage
- update
- ignoreUser
- Commands:
- get
- list
Expand Down
1 change: 1 addition & 0 deletions developer-guides/rest-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and
| `/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/) |
| `/api/v1/chat.ignoreUser` | Ignores an user from a chat. | [Link](chat/ignoreuser/) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thayannevls can you please put this in alphabetic order? Also if you can put the getMessageReadReceipts in order, because it is unordered too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thayannevls I think that here, you forgot to put in alphabetic order 😶

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry 😅 now is fixed


### 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 @@ -16,3 +16,4 @@
| `/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/) |
| `/api/v1/chat.ignoreUser` | Ignores an user from a chat. | [Link](ignoreuser/) |
37 changes: 37 additions & 0 deletions developer-guides/rest-api/chat/ignoreuser/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Ignore user

Ignores an user in a chat.

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

## Payload

| Argument | Example | Required | Description |
| :--- | :--- | :--- | :--- |
| `rid` | `KLTM332QEwWLPJrjRPtcPHimPnLHsusiDF` | Required | The room ID. |
| `userId` | `7aDSXtjMA3KPLxLjt` | Required | The User ID. |

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is missing the ignore query parameter, as we can see here.

## Example Call

```bash
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
-H "Content-type:application/json" \
http://localhost:3000/api/v1/chat.ignoreUser?rid=KLTM332QEwWLPJrjRPtcPHimPnLHsusiDF&userId=7aDSXtjMA3KPLxLjt
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if you can create an example with ignore parameter, it would be good. 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it! Can you verify if it's correct now?


## Example Result

```json
{
"success": true
}
```

## Change Log

| Version | Description |
| :--- | :--- |
| | Added |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version that it has been add is 0.64.0, as we can see here.