Merge remote-tracking branch 'remotes/origin/2323-accounts-relationships-hotfix'...
authorIvan Tashkinov <ivantashkinov@gmail.com>
Thu, 2 Apr 2020 16:38:39 +0000 (19:38 +0300)
committerIvan Tashkinov <ivantashkinov@gmail.com>
Thu, 2 Apr 2020 16:38:39 +0000 (19:38 +0300)
# Conflicts:
# lib/pleroma/web/mastodon_api/views/account_view.ex
# lib/pleroma/web/mastodon_api/views/status_view.ex

1  2 
lib/pleroma/web/mastodon_api/views/account_view.ex
lib/pleroma/web/mastodon_api/views/notification_view.ex
lib/pleroma/web/mastodon_api/views/status_view.ex

index b20a00a89161bfe1ce7808592a4cc7f83cd039e3,99e62f580c4f613a1ae32e3198363285fc93810f..32f1ad5b19bd3a6a0014209401143b3b9c64c48c
@@@ -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) ->
index 9cbd31878b5b8ce939903c98d9650002e7eb5b71,cea76e735b0d3040ac33b63d49f6c3a5804c7f1c..b5850e1ae8aa1a9a1320faf22e876c4cc63001b5
@@@ -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 =