From 24d43b7293b20eacd6e3f302aa8352bd18e28d64 Mon Sep 17 00:00:00 2001 From: silverpill Date: Sat, 5 Oct 2024 15:27:22 +0000 Subject: [PATCH] FEP-c0e0: Update proposal (#404) - Require shortcode in content to be enclosed in colons. - Added a note about possible constraints on number of reactions. - Added example of Undo(EmojiReact) activity. - Added "Implementations" section. Reviewed-on: https://codeberg.org/fediverse/fep/pulls/404 Co-authored-by: silverpill Co-committed-by: silverpill --- fep/c0e0/fep-c0e0.md | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/fep/c0e0/fep-c0e0.md b/fep/c0e0/fep-c0e0.md index 1644ff6..550c950 100644 --- a/fep/c0e0/fep-c0e0.md +++ b/fep/c0e0/fep-c0e0.md @@ -25,11 +25,11 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S `EmojiReact` activity type is considered to be a part of [LitePub] vocabulary. Its full IRI is `http://litepub.social/ns#EmojiReact`. -This activity is similar to `Like` activity. In addition to standard properties of `Like` activity, `EmojiReact` activity MUST have a `content` property. +This activity is similar to `Like` activity. In addition to standard properties of `Like` activity, `EmojiReact` activity MUST have a `content` property. Reaction content MUST be either a single unicode grapheme, or a shortcode of a custom emoji. The shortcode MUST be enclosed in colons. -Reaction content MUST be either a single unicode grapheme, or a shortcode of a custom emoji. If custom emoji is used, `EmojiReact` activity MUST have a `tag` property containing a single `Emoji` object (which is specified in [Mastodon ActivityPub extension documentation](https://docs.joinmastodon.org/spec/activitypub/#Emoji)). The embedded `Emoji` can originate from a server that is different from the actor's server. +If custom emoji is used, `EmojiReact` activity MUST have a `tag` property containing a single `Emoji` object (which is specified in [Mastodon ActivityPub extension documentation](https://docs.joinmastodon.org/spec/activitypub/#Emoji)). The value of its `name` property MUST be a shortcode that matches the shortcode in reaction content, and it SHOULD be enclosed in colons. The embedded `Emoji` can originate from a server that is different from the actor's server. -An actor can generate multiple `EmojiReact` activities for a single `object`. +An actor can generate multiple `EmojiReact` activities for a single `object`. However, implementers MAY choose to not allow more than one reaction with the same emoji, or more than one reaction per object. Example with unicode emoji: @@ -98,6 +98,30 @@ Emoji reaction can also be represented as a `Like` activity. This variant of emo Implementations MUST process `Like` with `content` in the same way as `EmojiReact` activities. +## Undo reaction + +Emoji reactions can be retracted using a standard `Undo` activity: + +```json +{ + "@context": [ + "https://www.w3.org/ns/activitystreams" + ], + "actor": "https://alice.social/users/alice", + "id": "https://alice.social/activities/99b8f47b-f3a9-4cf5-94a2-95352e7462d6", + "object": "https://alice.social/activities/65379d47-b7aa-4ef6-8e4f-41149dda1d2c", + "to": [ + "https://alice.social/users/alice/followers", + "https://bob.social/users/bob" + ], + "type": "Undo" +} +``` + +## Implementations + +This document is based on implementations of emoji reactions in Misskey and Pleroma. + ## References - Christine Lemmer Webber, Jessica Tallon, [ActivityPub][ActivityPub], 2018