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

Commit

Permalink
Add warning for user's identity validation (#1573)
Browse files Browse the repository at this point in the history
* Add warning for user's identity validation

* Fix lint

Co-authored-by: Martin Schoeler <martin.schoeler@rocket.chat>
  • Loading branch information
MarcosSpessatto and MartinSchoeler authored Feb 10, 2020
1 parent f2bcbe2 commit 0a66a01
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 5 additions & 0 deletions developer-guides/rest-api/chat/postmessage/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Post a chat message

## IMPORTANT

You only can send `alias` and `avatar` properties if your user has the `bot` role. We implement this rule to avoid users to impersonate other users.

| URL | Requires Auth | HTTP Method |
| :------------------------- | :------------ | :---------- |
| `/api/v1/chat.postMessage` | `yes` | `POST` |
Expand Down Expand Up @@ -138,6 +142,7 @@ curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \

| Version | Description |
| :------ | :--------------------------------------------------------------------------- |
| 2.4.0 | Added validation on user's identity |
| 0.49.0 | The `channel` can now be a room's id. |
| 0.48.0 | Information about the sent message is now returned. |
| 0.17.0 | Messages aren't always processed as from BOT and urls are parsed by default. |
Expand Down
11 changes: 8 additions & 3 deletions developer-guides/rest-api/chat/sendmessage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The difference between `chat.postMessage` and `chat.sendMessage` is that `chat.s
for passing a value for `_id` and the other one doesn't. Also, `chat.sendMessage` only sends it to
one channel whereas the other one allows for sending to more than one channel at a time.

## IMPORTANT

You only can send `alias` and `avatar` properties if your user has the `bot` role. We implemented this rule to avoid users to impersonate other users.

| URL | Requires Auth | HTTP Method |
| :------------------------- | :------------ | :---------- |
| `/api/v1/chat.sendMessage` | `yes` | `POST` |
Expand Down Expand Up @@ -137,6 +141,7 @@ curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \

## Change Log

| Version | Description |
| :------ | :----------- |
| 0.60.0 | Added |
| Version | Description |
| :------ | :---------------------------------- |
| 2.4.0 | Added validation on user's identity |
| 0.60.0 | Added |

0 comments on commit 0a66a01

Please sign in to comment.