TLCommentReaction

See source code
Table of contents

Extends BaseRecord<'comment-reaction', TLCommentReactionId>.

One person's emoji reaction to one comment.

A reaction is its own record rather than a field on the comment: comment records are owner-only for updates, and a shared field would make concurrent reactions race to overwrite each other.

A user holds at most one record per (comment, emoji) pair, enforced by the derived id — see createCommentReactionId. Limiting a user to one reaction overall is client-side policy (the commenting package's reactionMode), not a property of this record.

interface TLCommentReaction extends BaseRecord<
  "comment-reaction",
  TLCommentReactionId
> {}

Properties

commentId

The comment being reacted to.

commentId: TLCommentId;

createdAt

createdAt: number;

emoji

The emoji itself, as a string (e.g. '👍'), not a shortcode.

emoji: string;

id

readonly
readonly id: Id;

meta

meta: JsonObject;

pageId

Denormalized from the comment — see TLComment.pageId.

pageId: TLPageId;

threadId

Denormalized from the comment, so a thread's reactions can be found without a join.

threadId: TLCommentThreadId;

typeName

readonly
readonly typeName: TypeName;

userId

Who reacted. See TLCommentThread.createdBy — same server-stamping caveat applies.

userId: string;

Prev
TLComment
Next
TLCommentThread