projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix/mastoapi-more-object-preloads' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
mastodon_api_controller.ex
diff --git
a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 47e263aaee0bfa9567246b4f6abad086109674ed..c3c75bd9a5a6b6f654426c0785f8edf17fe52dd0 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@
-435,6
+435,7
@@
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|> Map.put("local_only", local_only)
|> Map.put("blocking_user", user)
|> Map.put("muting_user", user)
|> Map.put("local_only", local_only)
|> Map.put("blocking_user", user)
|> Map.put("muting_user", user)
+ |> Map.put("user", user)
|> ActivityPub.fetch_public_activities()
|> Enum.reverse()
|> ActivityPub.fetch_public_activities()
|> Enum.reverse()
@@
-885,8
+886,8
@@
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
def favourited_by(%{assigns: %{user: user}} = conn, %{"id" => id}) do
end
def favourited_by(%{assigns: %{user: user}} = conn, %{"id" => id}) do
- with %Activity{
data: %{"object" => object}} <- Activity.get_by_id
(id),
- %Object{data: %{"likes" => likes}} <- Object.normalize(
object
) do
+ with %Activity{
} = activity <- Activity.get_by_id_with_object
(id),
+ %Object{data: %{"likes" => likes}} <- Object.normalize(
activity
) do
q = from(u in User, where: u.ap_id in ^likes)
users =
q = from(u in User, where: u.ap_id in ^likes)
users =
@@
-902,8
+903,8
@@
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
def reblogged_by(%{assigns: %{user: user}} = conn, %{"id" => id}) do
end
def reblogged_by(%{assigns: %{user: user}} = conn, %{"id" => id}) do
- with %Activity{
data: %{"object" => object}} <- Activity.get_by_id
(id),
- %Object{data: %{"announcements" => announces}} <- Object.normalize(
object
) do
+ with %Activity{
} = activity <- Activity.get_by_id_with_object
(id),
+ %Object{data: %{"announcements" => announces}} <- Object.normalize(
activity
) do
q = from(u in User, where: u.ap_id in ^announces)
users =
q = from(u in User, where: u.ap_id in ^announces)
users =
@@
-944,6
+945,7
@@
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|> Map.put("local_only", local_only)
|> Map.put("blocking_user", user)
|> Map.put("muting_user", user)
|> Map.put("local_only", local_only)
|> Map.put("blocking_user", user)
|> Map.put("muting_user", user)
+ |> Map.put("user", user)
|> Map.put("tag", tags)
|> Map.put("tag_all", tag_all)
|> Map.put("tag_reject", tag_reject)
|> Map.put("tag", tags)
|> Map.put("tag_all", tag_all)
|> Map.put("tag_reject", tag_reject)
@@
-1350,6
+1352,7
@@
defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
params
|> Map.put("type", "Create")
|> Map.put("blocking_user", user)
params
|> Map.put("type", "Create")
|> Map.put("blocking_user", user)
+ |> Map.put("user", user)
|> Map.put("muting_user", user)
# we must filter the following list for the user to avoid leaking statuses the user
|> Map.put("muting_user", user)
# we must filter the following list for the user to avoid leaking statuses the user