SetReaction

[POST] .../v1/chatmessage/setreaction

Toggles one reaction of the current user on a message. Use this method when the current request user selects or removes one reaction on a chat message. The request body is required, id must contain the message UUID and reaction must be one of the reaction codes allowed for the chat and server settings. Access is scoped to the current user's ability to read and react in the message chat and the method returns row_affected with the affected message id. Missing body, missing id or reaction, unsupported reaction code, reaction count limits, denied access, missing message and database failures are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
id String Required Message UUID.
reaction String Required Reaction code.

Request Example

{
  "id": "4b9727ec-a389-4274-95b6-069350000001",
  "reaction": "like"
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1,
    "ids": [
      "4b9727ec-a389-4274-95b6-069350000001"
    ]
  }
}