#[non_exhaustive]pub enum ReactionChange<'a> {
Add {
sender_reaction_id: &'a str,
emoji: &'a str,
sent_at: &'a UTCDate,
},
Remove {
sender_reaction_id: &'a str,
},
}Expand description
A single reaction change in a Message/set patch (JMAP Chat §4.5).
The patch key is reactions/<senderReactionId> (JSON Pointer).
senderReactionId is a caller-generated ID (e.g. ULID) that uniquely
identifies this reaction slot for the sending user in this message.
§Precondition: sender_reaction_id
On both variants, sender_reaction_id is embedded in a JSON Pointer
(RFC 6901) as the patch key reactions/<id>.
SessionClient::message_update
rejects an Add or Remove whose sender_reaction_id is empty, or
contains / or ~, with
ClientError::InvalidArgument.
The slash/tilde restriction is unintuitive — emoji-shortcode systems
(e.g. :slight_smile:/+1) and any user-supplied string source naturally
produce these characters. Generate IDs from a constrained alphabet
(ULID, UUID v4, base64url) rather than from user input.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Add
Add a reaction. Patch value: {emoji, sentAt}.
Fields
Remove
Remove a reaction. Patch value: null.