From 043cd5aa5458bb5b2ae0b44e475db59c195bec24 Mon Sep 17 00:00:00 2001 From: lain Date: Wed, 22 Jan 2020 13:58:02 +0100 Subject: [PATCH] Emoji reactions: Document changes --- CHANGELOG.md | 1 + docs/API/differences_in_mastoapi_responses.md | 2 +- docs/API/pleroma_api.md | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09f31d5a9..0bc555878 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,6 +95,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Captcha: Enable by default - Mastodon API: Add support for `account_id` param to filter notifications by the account - Mastodon API: Add `emoji_reactions` property to Statuses +- Mastodon API: Change emoji reaction reply format ### Fixed diff --git a/docs/API/differences_in_mastoapi_responses.md b/docs/API/differences_in_mastoapi_responses.md index 50076cf98..3f75a13f7 100644 --- a/docs/API/differences_in_mastoapi_responses.md +++ b/docs/API/differences_in_mastoapi_responses.md @@ -29,7 +29,7 @@ Has these additional fields under the `pleroma` object: - `spoiler_text`: a map consisting of alternate representations of the `spoiler_text` property with the key being it's mimetype. Currently the only alternate representation supported is `text/plain` - `expires_at`: a datetime (iso8601) that states when the post will expire (be deleted automatically), or empty if the post won't expire - `thread_muted`: true if the thread the post belongs to is muted -- `emoji_reactions`: An object with all the emoji reactions with count. Contains no information about the reacting users, for that use the `emoji_reactions_by` endpoint. +- `emoji_reactions`: A list with emoji / reaction count tuples. Contains no information about the reacting users, for that use the `emoji_reactions_by` endpoint. ## Attachments diff --git a/docs/API/pleroma_api.md b/docs/API/pleroma_api.md index 689edbcc2..9ca8a5af0 100644 --- a/docs/API/pleroma_api.md +++ b/docs/API/pleroma_api.md @@ -451,11 +451,11 @@ Emoji reactions work a lot like favourites do. They make it possible to react to * Method: `GET` * Authentication: optional * Params: None -* Response: JSON, a map of emoji to account list mappings. +* Response: JSON, a list of emoji/account list tuples, sorted by emoji insertion date, in ascending order, e.g, the first emoji in the list is the oldest. * Example Response: ```json -{ - "😀" => [{"id" => "xyz.."...}, {"id" => "zyx..."}], - "🗡" => [{"id" => "abc..."}] -} +[ + ["😀", [{"id" => "xyz.."...}, {"id" => "zyx..."}]], + ["☕", [{"id" => "abc..."}]] +] ```