From: Ivan Tashkinov Date: Thu, 2 Apr 2020 16:38:39 +0000 (+0300) Subject: Merge remote-tracking branch 'remotes/origin/2323-accounts-relationships-hotfix'... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=3fa51f72728255fbe287bb307ab38d563e5611b4;p=akkoma Merge remote-tracking branch 'remotes/origin/2323-accounts-relationships-hotfix' into output-of-relationships-in-statuses # Conflicts: # lib/pleroma/web/mastodon_api/views/account_view.ex # lib/pleroma/web/mastodon_api/views/status_view.ex --- 3fa51f72728255fbe287bb307ab38d563e5611b4 diff --cc lib/pleroma/web/mastodon_api/views/account_view.ex index b20a00a89,99e62f580..32f1ad5b1 --- a/lib/pleroma/web/mastodon_api/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/views/account_view.ex @@@ -13,7 -13,8 +13,9 @@@ defmodule Pleroma.Web.MastodonAPI.Accou alias Pleroma.Web.MediaProxy def render("index.json", %{users: users} = opts) do + reading_user = opts[:for] + + # Note: :skip_relationships option is currently intentionally not supported for accounts relationships_opt = cond do Map.has_key?(opts, :relationships) -> diff --cc lib/pleroma/web/mastodon_api/views/status_view.ex index 9cbd31878,cea76e735..b5850e1ae --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@@ -97,9 -99,7 +99,9 @@@ defmodule Pleroma.Web.MastodonAPI.Statu true -> actors = Enum.map(activities ++ parent_activities, &get_user(&1.data["actor"])) - UserRelationship.view_relationships_option(opts[:for], actors, - UserRelationship.view_relationships_option(reading_user, actors) ++ UserRelationship.view_relationships_option(reading_user, actors, + source_mutes_only: opts[:skip_relationships] + ) end opts =