Skip to content

Reactions Extension

The Reactions Extension allows users to express their reactions (“react”) to notes with emojis.

This extension requires pub.versia:social@1, which defines Notes.

Definition

Type
"pub.versia:reactions/Reaction"
Fetch
GET /.versia/v0.7/entities/pub.versia:reactions/Reaction/{id}

Fields

type string Required

MUST be pub.versia:reactions/Reaction.

author Reference Required

Reference to the User that is reacting.

target Reference Required

Reference to the Note attached to the reaction.

content string Required

Emoji content of reaction. Can also be arbitrary text, or the name of a Custom Emoji, such as :happy_face:, with a matching entry in this Reaction’s own pub.versia:custom_emojis extension. MUST be at least 1 character long.

Receivers MAY drop a Reaction they cannot display.

Inherited from Entity: id, created_at, updated_at, extensions
{
    "id": "033fsr7ggg004",
    "type": "pub.versia:reactions/Reaction",
    "created_at": "2021-01-01T00:00:00Z",
    "author": "example.org:033wv9k6n0007",
    "target": "example.com:0337hp246t002",
    "content": "😀"
}

Behavior

To undo a Reaction, a Delete entity MUST be used. The deleted property of the Delete entity MUST be a Reference to the Reaction to be removed.

Delivery and Access

A sender MUST deliver Reactions to the author of the Note and, if the Note is public, to the subscribers of the reacting user.

Any instance that may fetch the Note, and the instance of the Note’s author, may fetch a Reaction.

Reactions can be displayed to clients depending on the privacy settings of the associated Note.

Collections

The Reactions extension adds the following collections to the Note entity:

Interaction Types

This extension registers the following interaction types:

  • pub.versia:reactions/react, for adding a Reaction to a Note.