- Pleroma API: `GET /api/v1/pleroma/accounts/:id/scrobbles` to get a list of recently scrobbled items
- Pleroma API: `POST /api/v1/pleroma/scrobble` to scrobble a media item
- Mastodon API: Add `upload_limit`, `avatar_upload_limit`, `background_upload_limit`, and `banner_upload_limit` to `/api/v1/instance`
+ - Mastodon API: Add `pleroma.unread_conversation_count` to the Account entity
+- Pleroma API: Add Emoji reactions
### Changed
- **Breaking:** Elixir >=1.8 is now required (was >= 1.7)
|> Repo.one()
end
- def make_emoji_reaction_data(user, object, emoji, activity_id) do
- make_like_data(user, object, activity_id)
- |> Map.put("type", "EmojiReaction")
- |> Map.put("content", emoji)
- end
-
+ @doc """
+ Returns like activities targeting an object
+ """
+ def get_object_likes(%{data: %{"id" => id}}) do
+ id
+ |> Activity.Queries.by_object_id()
+ |> Activity.Queries.by_type("Like")
+ |> Repo.all()
+ end
+
@spec make_like_data(User.t(), map(), String.t()) :: map()
def make_like_data(
%User{ap_id: ap_id} = actor,
|> maybe_put("id", activity_id)
end
++ def make_emoji_reaction_data(user, object, emoji, activity_id) do
++ make_like_data(user, object, activity_id)
++ |> Map.put("type", "EmojiReaction")
++ |> Map.put("content", emoji)
++ end
++
@spec update_element_in_object(String.t(), list(any), Object.t()) ::
{:ok, Object.t()} | {:error, Ecto.Changeset.t()}
def update_element_in_object(property, element, object) do