POST ./chat/message
It is used to add new message and publish into RabbitMq event with type "chat.message.created", containing cmsgID key.
Permission only with school config keys: grpEnabled
Parameter cmRole can have the following value:
- 1 = member
- 2 = moderator
Parameter cmsgType can have the following value:
- 1 = text message
- 2 = system message
- 3 = file
- 4 = album
POST parameters
| Name | Value Type | Validation | Details |
|---|---|---|---|
| crID | int | Required | Room ID. |
| cmsgType | int | Required | The type of the message sent. |
| cmsgText | string | Required | The content itself. |
| cmsgFsID | int | Optional | The field FsID from the Files module. |
Validation
| Error Field | Error Code | Error Message |
|---|---|---|
| crID | 101 | This room is moderated. |
| cmsgFsID | 103 | Invalid fsID. |
Output example
{"cmsgID": "27"}
