From: kaniini Date: Mon, 22 Apr 2019 02:07:19 +0000 (+0000) Subject: Merge branch 'rework-emoji-management' into 'develop' X-Git-Url: http://git.squeep.com/?a=commitdiff_plain;h=7fcbda702e76b6390076c28832f5aea80086d15a;hp=-c;p=akkoma Merge branch 'rework-emoji-management' into 'develop' Remove finmoji and add a way to download emojis in packs Closes #817 and #821 See merge request pleroma/pleroma!1073 --- 7fcbda702e76b6390076c28832f5aea80086d15a diff --combined CHANGELOG.md index ca056fc71,c778e0234..ed078bc69 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@@ -24,6 -24,7 +24,7 @@@ The format is based on [Keep a Changelo - Mastodon API: [Reports](https://docs.joinmastodon.org/api/rest/reports/) - ActivityPub C2S: OAuth endpoints - Metadata RelMe provider + - Emoji packs and emoji pack manager ### Changed - **Breaking:** Configuration: move from Pleroma.Mailer to Pleroma.Emails.Mailer @@@ -50,6 -51,7 +51,7 @@@ - Mastodon API: Remove attachment limit in the Status entity - Deps: Updated Cowboy to 2.6 - Deps: Updated Ecto to 3.0.7 + - Don't ship finmoji by default, they can be installed as an emoji pack ### Fixed - Followers counter not being updated when a follower is blocked @@@ -67,13 -69,10 +69,13 @@@ - MediaProxy: Parse name from content disposition headers even for non-whitelisted types - MediaProxy: S3 link encoding - Rich Media: Reject any data which cannot be explicitly encoded into JSON +- Pleroma API: Importing follows from Mastodon 2.8+ - Mastodon API: `/api/v1/favourites` serving only public activities - Mastodon API: Reblogs having `in_reply_to_id` - `null` even when they are replies - Mastodon API: Streaming API broadcasting wrong activity id - Mastodon API: 500 errors when requesting a card for a private conversation +- Mastodon API: Handling of `reblogs` in `/api/v1/accounts/:id/follow` +- Mastodon API: Correct `reblogged`, `favourited`, and `bookmarked` values in the reblog status JSON ## [0.9.9999] - 2019-04-05 ### Security diff --combined lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 485e79a0d,2a81dcc67..d271d3786 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@@ -190,7 -190,7 +190,7 @@@ defmodule Pleroma.Web.MastodonAPI.Masto "static_url" => url, "visible_in_picker" => true, "url" => url, - "tags" => String.split(tags, ",") + "tags" => tags } end) end @@@ -338,7 -338,7 +338,7 @@@ end def get_status(%{assigns: %{user: user}} = conn, %{"id" => id}) do - with %Activity{} = activity <- Activity.get_by_id(id), + with %Activity{} = activity <- Activity.get_by_id_with_object(id), true <- Visibility.visible_for_user?(activity, user) do conn |> put_view(StatusView) @@@ -487,8 -487,7 +487,8 @@@ end def reblog_status(%{assigns: %{user: user}} = conn, %{"id" => ap_id_or_id}) do - with {:ok, announce, _activity} <- CommonAPI.repeat(ap_id_or_id, user) do + with {:ok, announce, _activity} <- CommonAPI.repeat(ap_id_or_id, user), + %Activity{} = announce <- Activity.normalize(announce.data) do conn |> put_view(StatusView) |> try_render("status.json", %{activity: announce, for: user, as: :activity}) @@@ -497,7 -496,7 +497,7 @@@ def unreblog_status(%{assigns: %{user: user}} = conn, %{"id" => ap_id_or_id}) do with {:ok, _unannounce, %{data: %{"id" => id}}} <- CommonAPI.unrepeat(ap_id_or_id, user), - %Activity{} = activity <- Activity.get_create_by_object_ap_id(id) do + %Activity{} = activity <- Activity.get_create_by_object_ap_id_with_object(id) do conn |> put_view(StatusView) |> try_render("status.json", %{activity: activity, for: user, as: :activity}) @@@ -822,7 -821,8 +822,7 @@@ def follow(%{assigns: %{user: follower}} = conn, %{"id" => id}) do with {_, %User{} = followed} <- {:followed, User.get_cached_by_id(id)}, {_, true} <- {:followed, follower.id != followed.id}, - false <- User.following?(follower, followed), - {:ok, follower, followed, _} <- CommonAPI.follow(follower, followed) do + {:ok, follower} <- MastodonAPI.follow(follower, followed, conn.params) do conn |> put_view(AccountView) |> render("relationship.json", %{user: follower, target: followed}) @@@ -830,6 -830,19 +830,6 @@@ {:followed, _} -> {:error, :not_found} - true -> - followed = User.get_cached_by_id(id) - - {:ok, follower} = - case conn.params["reblogs"] do - true -> CommonAPI.show_reblogs(follower, followed) - false -> CommonAPI.hide_reblogs(follower, followed) - end - - conn - |> put_view(AccountView) - |> render("relationship.json", %{user: follower, target: followed}) - {:error, message} -> conn |> put_resp_content_type("application/json")