diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex
index b20a00a89..32f1ad5b1 100644
--- a/lib/pleroma/web/mastodon_api/views/account_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/account_view.ex
@@ -13,17 +13,19 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
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) ->
opts[:relationships]
- is_nil(opts[:for]) ->
+ is_nil(reading_user) ->
UserRelationship.view_relationships_option(nil, [])
true ->
- UserRelationship.view_relationships_option(opts[:for], users)
+ UserRelationship.view_relationships_option(reading_user, users)
end
opts = Map.put(opts, :relationships, relationships_opt)
@@ -144,7 +146,7 @@ def render("relationships.json", %{user: user, targets: targets} = opts) do
Map.has_key?(opts, :relationships) ->
opts[:relationships]
- is_nil(opts[:for]) ->
+ is_nil(user) ->
UserRelationship.view_relationships_option(nil, [])
true ->
diff --git a/lib/pleroma/web/mastodon_api/views/notification_view.ex b/lib/pleroma/web/mastodon_api/views/notification_view.ex
index 78d187f9a..734ffbf39 100644
--- a/lib/pleroma/web/mastodon_api/views/notification_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/notification_view.ex
@@ -36,7 +36,7 @@ def render("index.json", %{notifications: notifications, for: reading_user} = op
Map.has_key?(opts, :relationships) ->
opts[:relationships]
- is_nil(opts[:for]) ->
+ is_nil(reading_user) ->
UserRelationship.view_relationships_option(nil, [])
true ->
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index 9cbd31878..b5850e1ae 100644
--- a/lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -72,6 +72,8 @@ defp reblogged?(activity, user) do
end
def render("index.json", opts) do
+ reading_user = opts[:for]
+
# To do: check AdminAPIControllerTest on the reasons behind nil activities in the list
activities = Enum.filter(opts.activities, & &1)
replied_to_activities = get_replied_to_activities(activities)
@@ -82,8 +84,8 @@ def render("index.json", opts) do
|> Enum.map(&Object.normalize(&1).data["id"])
|> Activity.create_by_object_ap_id()
|> Activity.with_preloaded_object(:left)
- |> Activity.with_preloaded_bookmark(opts[:for])
- |> Activity.with_set_thread_muted_field(opts[:for])
+ |> Activity.with_preloaded_bookmark(reading_user)
+ |> Activity.with_set_thread_muted_field(reading_user)
|> Repo.all()
relationships_opt =
@@ -91,13 +93,13 @@ def render("index.json", opts) do
Map.has_key?(opts, :relationships) ->
opts[:relationships]
- is_nil(opts[:for]) ->
+ is_nil(reading_user) ->
UserRelationship.view_relationships_option(nil, [])
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,
source_mutes_only: opts[:skip_relationships]
)
end
diff --git a/priv/static/adminfe/app.c836e084.css b/priv/static/adminfe/app.85534e14.css
similarity index 100%
rename from priv/static/adminfe/app.c836e084.css
rename to priv/static/adminfe/app.85534e14.css
diff --git a/priv/static/adminfe/chunk-0d8f.650c8e81.css b/priv/static/adminfe/chunk-0d8f.d85f5a29.css
similarity index 98%
rename from priv/static/adminfe/chunk-0d8f.650c8e81.css
rename to priv/static/adminfe/chunk-0d8f.d85f5a29.css
index 0b2a3f669..931620872 100644
Binary files a/priv/static/adminfe/chunk-0d8f.650c8e81.css and b/priv/static/adminfe/chunk-0d8f.d85f5a29.css differ
diff --git a/priv/static/adminfe/chunk-136a.3936457d.css b/priv/static/adminfe/chunk-136a.f1130f8e.css
similarity index 98%
rename from priv/static/adminfe/chunk-136a.3936457d.css
rename to priv/static/adminfe/chunk-136a.f1130f8e.css
index 2857a9d6e..f492b37d0 100644
Binary files a/priv/static/adminfe/chunk-136a.3936457d.css and b/priv/static/adminfe/chunk-136a.f1130f8e.css differ
diff --git a/priv/static/adminfe/chunk-13e9.98eaadba.css b/priv/static/adminfe/chunk-13e9.98eaadba.css
new file mode 100644
index 000000000..9f377eee2
Binary files /dev/null and b/priv/static/adminfe/chunk-13e9.98eaadba.css differ
diff --git a/priv/static/adminfe/chunk-2b9c.feb61a2b.css b/priv/static/adminfe/chunk-2b9c.feb61a2b.css
new file mode 100644
index 000000000..f54eca1f5
Binary files /dev/null and b/priv/static/adminfe/chunk-2b9c.feb61a2b.css differ
diff --git a/priv/static/adminfe/chunk-46cf.a43e9415.css b/priv/static/adminfe/chunk-46cf.a43e9415.css
deleted file mode 100644
index aa7160528..000000000
Binary files a/priv/static/adminfe/chunk-46cf.a43e9415.css and /dev/null differ
diff --git a/priv/static/adminfe/chunk-46ef.d45db7be.css b/priv/static/adminfe/chunk-46ef.145de4f9.css
similarity index 96%
rename from priv/static/adminfe/chunk-46ef.d45db7be.css
rename to priv/static/adminfe/chunk-46ef.145de4f9.css
index d6cc7d182..deb5249ac 100644
Binary files a/priv/static/adminfe/chunk-46ef.d45db7be.css and b/priv/static/adminfe/chunk-46ef.145de4f9.css differ
diff --git a/priv/static/adminfe/chunk-4e7d.7aace723.css b/priv/static/adminfe/chunk-4e7d.7aace723.css
deleted file mode 100644
index 9a35b64a0..000000000
Binary files a/priv/static/adminfe/chunk-4e7d.7aace723.css and /dev/null differ
diff --git a/priv/static/adminfe/chunk-87b3.2affd602.css b/priv/static/adminfe/chunk-87b3.2affd602.css
deleted file mode 100644
index c4fa46d3e..000000000
Binary files a/priv/static/adminfe/chunk-87b3.2affd602.css and /dev/null differ
diff --git a/priv/static/adminfe/chunk-87b3.3c6ede9c.css b/priv/static/adminfe/chunk-87b3.3c6ede9c.css
new file mode 100644
index 000000000..f0e6bf4ee
Binary files /dev/null and b/priv/static/adminfe/chunk-87b3.3c6ede9c.css differ
diff --git a/priv/static/adminfe/chunk-e5cf.cba3ae06.css b/priv/static/adminfe/chunk-88c9.184084df.css
similarity index 92%
rename from priv/static/adminfe/chunk-e5cf.cba3ae06.css
rename to priv/static/adminfe/chunk-88c9.184084df.css
index a74b42d14..f3299f33b 100644
Binary files a/priv/static/adminfe/chunk-e5cf.cba3ae06.css and b/priv/static/adminfe/chunk-88c9.184084df.css differ
diff --git a/priv/static/adminfe/chunk-cf57.4d39576f.css b/priv/static/adminfe/chunk-cf57.26596375.css
similarity index 74%
rename from priv/static/adminfe/chunk-cf57.4d39576f.css
rename to priv/static/adminfe/chunk-cf57.26596375.css
index 1190aca24..9f72b88c1 100644
Binary files a/priv/static/adminfe/chunk-cf57.4d39576f.css and b/priv/static/adminfe/chunk-cf57.26596375.css differ
diff --git a/priv/static/adminfe/index.html b/priv/static/adminfe/index.html
index 717b0f32d..3651c1cf0 100644
--- a/priv/static/adminfe/index.html
+++ b/priv/static/adminfe/index.html
@@ -1 +1 @@
-
Admin FE
\ No newline at end of file
+Admin FE
\ No newline at end of file
diff --git a/priv/static/adminfe/static/js/app.d2c3c6b3.js b/priv/static/adminfe/static/js/app.d2c3c6b3.js
deleted file mode 100644
index c527207dd..000000000
Binary files a/priv/static/adminfe/static/js/app.d2c3c6b3.js and /dev/null differ
diff --git a/priv/static/adminfe/static/js/app.d2c3c6b3.js.map b/priv/static/adminfe/static/js/app.d2c3c6b3.js.map
deleted file mode 100644
index 7b2d4dc05..000000000
Binary files a/priv/static/adminfe/static/js/app.d2c3c6b3.js.map and /dev/null differ
diff --git a/priv/static/adminfe/static/js/app.d898cc2b.js b/priv/static/adminfe/static/js/app.d898cc2b.js
new file mode 100644
index 000000000..9d60db06b
Binary files /dev/null and b/priv/static/adminfe/static/js/app.d898cc2b.js differ
diff --git a/priv/static/adminfe/static/js/app.d898cc2b.js.map b/priv/static/adminfe/static/js/app.d898cc2b.js.map
new file mode 100644
index 000000000..1c4ec7590
Binary files /dev/null and b/priv/static/adminfe/static/js/app.d898cc2b.js.map differ
diff --git a/priv/static/adminfe/static/js/chunk-0d8f.a85e3222.js b/priv/static/adminfe/static/js/chunk-0d8f.6d50ff86.js
similarity index 99%
rename from priv/static/adminfe/static/js/chunk-0d8f.a85e3222.js
rename to priv/static/adminfe/static/js/chunk-0d8f.6d50ff86.js
index e3b0ae986..4b0945f57 100644
Binary files a/priv/static/adminfe/static/js/chunk-0d8f.a85e3222.js and b/priv/static/adminfe/static/js/chunk-0d8f.6d50ff86.js differ
diff --git a/priv/static/adminfe/static/js/chunk-0d8f.a85e3222.js.map b/priv/static/adminfe/static/js/chunk-0d8f.6d50ff86.js.map
similarity index 99%
rename from priv/static/adminfe/static/js/chunk-0d8f.a85e3222.js.map
rename to priv/static/adminfe/static/js/chunk-0d8f.6d50ff86.js.map
index cf75f3243..da24cbef5 100644
Binary files a/priv/static/adminfe/static/js/chunk-0d8f.a85e3222.js.map and b/priv/static/adminfe/static/js/chunk-0d8f.6d50ff86.js.map differ
diff --git a/priv/static/adminfe/static/js/chunk-136a.142aa42a.js b/priv/static/adminfe/static/js/chunk-136a.c4719e3e.js
similarity index 99%
rename from priv/static/adminfe/static/js/chunk-136a.142aa42a.js
rename to priv/static/adminfe/static/js/chunk-136a.c4719e3e.js
index 812089b5f..0c2f1a52e 100644
Binary files a/priv/static/adminfe/static/js/chunk-136a.142aa42a.js and b/priv/static/adminfe/static/js/chunk-136a.c4719e3e.js differ
diff --git a/priv/static/adminfe/static/js/chunk-136a.142aa42a.js.map b/priv/static/adminfe/static/js/chunk-136a.c4719e3e.js.map
similarity index 99%
rename from priv/static/adminfe/static/js/chunk-136a.142aa42a.js.map
rename to priv/static/adminfe/static/js/chunk-136a.c4719e3e.js.map
index f6b4c84aa..4b137fd49 100644
Binary files a/priv/static/adminfe/static/js/chunk-136a.142aa42a.js.map and b/priv/static/adminfe/static/js/chunk-136a.c4719e3e.js.map differ
diff --git a/priv/static/adminfe/static/js/chunk-13e9.79da1569.js b/priv/static/adminfe/static/js/chunk-13e9.79da1569.js
new file mode 100644
index 000000000..b98177b82
Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-13e9.79da1569.js differ
diff --git a/priv/static/adminfe/static/js/chunk-13e9.79da1569.js.map b/priv/static/adminfe/static/js/chunk-13e9.79da1569.js.map
new file mode 100644
index 000000000..118a47034
Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-13e9.79da1569.js.map differ
diff --git a/priv/static/adminfe/static/js/chunk-2b9c.cf321c74.js b/priv/static/adminfe/static/js/chunk-2b9c.cf321c74.js
new file mode 100644
index 000000000..f06da0268
Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-2b9c.cf321c74.js differ
diff --git a/priv/static/adminfe/static/js/chunk-2b9c.cf321c74.js.map b/priv/static/adminfe/static/js/chunk-2b9c.cf321c74.js.map
new file mode 100644
index 000000000..1ec750dd1
Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-2b9c.cf321c74.js.map differ
diff --git a/priv/static/adminfe/static/js/chunk-46cf.3bd3567a.js b/priv/static/adminfe/static/js/chunk-46cf.3bd3567a.js
deleted file mode 100644
index 0795a46b6..000000000
Binary files a/priv/static/adminfe/static/js/chunk-46cf.3bd3567a.js and /dev/null differ
diff --git a/priv/static/adminfe/static/js/chunk-46cf.3bd3567a.js.map b/priv/static/adminfe/static/js/chunk-46cf.3bd3567a.js.map
deleted file mode 100644
index 9993be4aa..000000000
Binary files a/priv/static/adminfe/static/js/chunk-46cf.3bd3567a.js.map and /dev/null differ
diff --git a/priv/static/adminfe/static/js/chunk-46ef.215af110.js b/priv/static/adminfe/static/js/chunk-46ef.671cac7d.js
similarity index 99%
rename from priv/static/adminfe/static/js/chunk-46ef.215af110.js
rename to priv/static/adminfe/static/js/chunk-46ef.671cac7d.js
index db11c7488..805cdea13 100644
Binary files a/priv/static/adminfe/static/js/chunk-46ef.215af110.js and b/priv/static/adminfe/static/js/chunk-46ef.671cac7d.js differ
diff --git a/priv/static/adminfe/static/js/chunk-46ef.215af110.js.map b/priv/static/adminfe/static/js/chunk-46ef.671cac7d.js.map
similarity index 98%
rename from priv/static/adminfe/static/js/chunk-46ef.215af110.js.map
rename to priv/static/adminfe/static/js/chunk-46ef.671cac7d.js.map
index 2da3dbec6..f6b420bb2 100644
Binary files a/priv/static/adminfe/static/js/chunk-46ef.215af110.js.map and b/priv/static/adminfe/static/js/chunk-46ef.671cac7d.js.map differ
diff --git a/priv/static/adminfe/static/js/chunk-4e7d.a40ad735.js b/priv/static/adminfe/static/js/chunk-4e7d.a40ad735.js
deleted file mode 100644
index ef2379ed9..000000000
Binary files a/priv/static/adminfe/static/js/chunk-4e7d.a40ad735.js and /dev/null differ
diff --git a/priv/static/adminfe/static/js/chunk-4e7d.a40ad735.js.map b/priv/static/adminfe/static/js/chunk-4e7d.a40ad735.js.map
deleted file mode 100644
index b349f12eb..000000000
Binary files a/priv/static/adminfe/static/js/chunk-4e7d.a40ad735.js.map and /dev/null differ
diff --git a/priv/static/adminfe/static/js/chunk-87b3.4704cadf.js b/priv/static/adminfe/static/js/chunk-87b3.3c11ef09.js
similarity index 60%
rename from priv/static/adminfe/static/js/chunk-87b3.4704cadf.js
rename to priv/static/adminfe/static/js/chunk-87b3.3c11ef09.js
index 9766fd7d2..3899ff190 100644
Binary files a/priv/static/adminfe/static/js/chunk-87b3.4704cadf.js and b/priv/static/adminfe/static/js/chunk-87b3.3c11ef09.js differ
diff --git a/priv/static/adminfe/static/js/chunk-87b3.3c11ef09.js.map b/priv/static/adminfe/static/js/chunk-87b3.3c11ef09.js.map
new file mode 100644
index 000000000..6c6a85667
Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-87b3.3c11ef09.js.map differ
diff --git a/priv/static/adminfe/static/js/chunk-87b3.4704cadf.js.map b/priv/static/adminfe/static/js/chunk-87b3.4704cadf.js.map
deleted file mode 100644
index 7472fcd92..000000000
Binary files a/priv/static/adminfe/static/js/chunk-87b3.4704cadf.js.map and /dev/null differ
diff --git a/priv/static/adminfe/static/js/chunk-88c9.e3583744.js b/priv/static/adminfe/static/js/chunk-88c9.e3583744.js
new file mode 100644
index 000000000..0070fc30a
Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-88c9.e3583744.js differ
diff --git a/priv/static/adminfe/static/js/chunk-88c9.e3583744.js.map b/priv/static/adminfe/static/js/chunk-88c9.e3583744.js.map
new file mode 100644
index 000000000..20e503d0c
Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-88c9.e3583744.js.map differ
diff --git a/priv/static/adminfe/static/js/chunk-cf57.3e45f57f.js b/priv/static/adminfe/static/js/chunk-cf57.3e45f57f.js
new file mode 100644
index 000000000..2b4fd918f
Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-cf57.3e45f57f.js differ
diff --git a/priv/static/adminfe/static/js/chunk-cf57.3e45f57f.js.map b/priv/static/adminfe/static/js/chunk-cf57.3e45f57f.js.map
new file mode 100644
index 000000000..6457630bd
Binary files /dev/null and b/priv/static/adminfe/static/js/chunk-cf57.3e45f57f.js.map differ
diff --git a/priv/static/adminfe/static/js/chunk-cf57.42b96339.js b/priv/static/adminfe/static/js/chunk-cf57.42b96339.js
deleted file mode 100644
index 81122f992..000000000
Binary files a/priv/static/adminfe/static/js/chunk-cf57.42b96339.js and /dev/null differ
diff --git a/priv/static/adminfe/static/js/chunk-cf57.42b96339.js.map b/priv/static/adminfe/static/js/chunk-cf57.42b96339.js.map
deleted file mode 100644
index 7471835b9..000000000
Binary files a/priv/static/adminfe/static/js/chunk-cf57.42b96339.js.map and /dev/null differ
diff --git a/priv/static/adminfe/static/js/chunk-e5cf.501d7902.js b/priv/static/adminfe/static/js/chunk-e5cf.501d7902.js
deleted file mode 100644
index fe5552943..000000000
Binary files a/priv/static/adminfe/static/js/chunk-e5cf.501d7902.js and /dev/null differ
diff --git a/priv/static/adminfe/static/js/chunk-e5cf.501d7902.js.map b/priv/static/adminfe/static/js/chunk-e5cf.501d7902.js.map
deleted file mode 100644
index 60676bfe7..000000000
Binary files a/priv/static/adminfe/static/js/chunk-e5cf.501d7902.js.map and /dev/null differ
diff --git a/priv/static/adminfe/static/js/runtime.cb26bbd1.js b/priv/static/adminfe/static/js/runtime.cb26bbd1.js
new file mode 100644
index 000000000..7180cc6e3
Binary files /dev/null and b/priv/static/adminfe/static/js/runtime.cb26bbd1.js differ
diff --git a/priv/static/adminfe/static/js/runtime.fa19e5d1.js.map b/priv/static/adminfe/static/js/runtime.cb26bbd1.js.map
similarity index 93%
rename from priv/static/adminfe/static/js/runtime.fa19e5d1.js.map
rename to priv/static/adminfe/static/js/runtime.cb26bbd1.js.map
index 6a2565556..631198682 100644
Binary files a/priv/static/adminfe/static/js/runtime.fa19e5d1.js.map and b/priv/static/adminfe/static/js/runtime.cb26bbd1.js.map differ
diff --git a/priv/static/adminfe/static/js/runtime.fa19e5d1.js b/priv/static/adminfe/static/js/runtime.fa19e5d1.js
deleted file mode 100644
index b905e42e1..000000000
Binary files a/priv/static/adminfe/static/js/runtime.fa19e5d1.js and /dev/null differ
diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs
index 8d00e3c21..4435f69ff 100644
--- a/test/web/mastodon_api/views/account_view_test.exs
+++ b/test/web/mastodon_api/views/account_view_test.exs
@@ -209,6 +209,9 @@ defp test_relationship_rendering(user, other_user, expected_result) do
relationships_opt = UserRelationship.view_relationships_option(user, [other_user])
opts = Map.put(opts, :relationships, relationships_opt)
assert expected_result == AccountView.render("relationship.json", opts)
+
+ assert [expected_result] ==
+ AccountView.render("relationships.json", %{user: user, targets: [other_user]})
end
@blank_response %{