pub struct Reactions { /* private fields */ }Expand description
Reaction operations on messages in a room.
Cheap to Clone (Arc-backed via Client) and Send + Sync.
Implementations§
Source§impl Reactions
impl Reactions
Sourcepub fn send(
&self,
serial: impl Into<Serial>,
name: impl Into<String>,
) -> SendReaction
pub fn send( &self, serial: impl Into<Serial>, name: impl Into<String>, ) -> SendReaction
Adds a reaction to a message.
POST /chat/v4/rooms/{roomName}/messages/{serial}/reactions. The reaction
kind defaults to ReactionType::Distinct (the JS
SDK default). Never retried (ADR-0006): a send carries no idempotency
key, and a multiple reaction increments a counter, so a blind retry could
double-count.
Sourcepub fn delete(&self, serial: impl Into<Serial>) -> DeleteReaction
pub fn delete(&self, serial: impl Into<Serial>) -> DeleteReaction
Removes a reaction from a message.
DELETE /chat/v4/rooms/{roomName}/messages/{serial}/reactions. The
reaction kind defaults to
ReactionType::Distinct. A name is required
for distinct and multiple reactions and optional for unique; the
missing-name case is rejected client-side with Error::InvalidRequest
before any request is sent. Retry-safe (DELETE is idempotent, ADR-0006).
Sourcepub fn for_client(&self, serial: impl Into<Serial>) -> ClientReactions
pub fn for_client(&self, serial: impl Into<Serial>) -> ClientReactions
Fetches the reaction summary for a single message, optionally filtered to
one client via ClientReactions::client_id.
GET /chat/v4/rooms/{roomName}/messages/{serial}/client-reactions.
Retry-safe. Useful when a message’s summary is clipped and you need to
determine whether a specific client has reacted.