ArchAstro.V1.ThreadMessages.Reactions (archastro v0.2.0)

Copy Markdown

Reaction API resource.

Summary

Functions

Add a reaction to a thread message

Remove a reaction from a thread message

Functions

create(client, message, input)

Add a reaction to a thread message

Adds an emoji reaction to the specified thread message on behalf of the authenticated user. If the user has already reacted to the message with the same emoji, the request returns a 409 Conflict rather than creating a duplicate.

The authenticated user must have read access to the thread containing the message. If the thread belongs to a team, the user must be a member of that team.

Successful response

remove(client, message)

@spec remove(ArchAstro.Client.t(), String.t()) ::
  {:ok, :ok} | {:error, ArchAstro.Error.reason()}

Remove a reaction from a thread message

Removes the authenticated user's emoji reaction from the specified thread message. The reaction is identified by the combination of the message ID and the emoji; only the reaction belonging to the calling user is removed.

Returns 204 No Content on success. Returns 404 if no matching reaction exists for the user and emoji on that message, or if the message itself cannot be found. The authenticated user must have read access to the thread containing the message.

Empty response body. HTTP 204 No Content on success.