aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/pleroma_api
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/pleroma_api')
-rw-r--r--lib/pleroma/web/pleroma_api/controllers/account_controller.ex5
-rw-r--r--lib/pleroma/web/pleroma_api/controllers/pleroma_api_controller.ex17
2 files changed, 12 insertions, 10 deletions
diff --git a/lib/pleroma/web/pleroma_api/controllers/account_controller.ex b/lib/pleroma/web/pleroma_api/controllers/account_controller.ex
index 07078d415..0a3f45620 100644
--- a/lib/pleroma/web/pleroma_api/controllers/account_controller.ex
+++ b/lib/pleroma/web/pleroma_api/controllers/account_controller.ex
@@ -6,7 +6,7 @@ defmodule Pleroma.Web.PleromaAPI.AccountController do
use Pleroma.Web, :controller
import Pleroma.Web.ControllerHelper,
- only: [json_response: 3, add_link_headers: 2, assign_account_by_id: 2, skip_relationships?: 1]
+ only: [json_response: 3, add_link_headers: 2, assign_account_by_id: 2]
alias Ecto.Changeset
alias Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug
@@ -149,8 +149,7 @@ defmodule Pleroma.Web.PleromaAPI.AccountController do
|> render("index.json",
activities: activities,
for: for_user,
- as: :activity,
- skip_relationships: skip_relationships?(params)
+ as: :activity
)
end
diff --git a/lib/pleroma/web/pleroma_api/controllers/pleroma_api_controller.ex b/lib/pleroma/web/pleroma_api/controllers/pleroma_api_controller.ex
index 8bc77b75e..e834133b2 100644
--- a/lib/pleroma/web/pleroma_api/controllers/pleroma_api_controller.ex
+++ b/lib/pleroma/web/pleroma_api/controllers/pleroma_api_controller.ex
@@ -5,7 +5,7 @@
defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
use Pleroma.Web, :controller
- import Pleroma.Web.ControllerHelper, only: [add_link_headers: 2, skip_relationships?: 1]
+ import Pleroma.Web.ControllerHelper, only: [add_link_headers: 2]
alias Pleroma.Activity
alias Pleroma.Conversation.Participation
@@ -69,7 +69,12 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
%{
name: emoji,
count: length(users),
- accounts: AccountView.render("index.json", %{users: users, for: user, as: :user}),
+ accounts:
+ AccountView.render("index.json", %{
+ users: users,
+ for: user,
+ as: :user
+ }),
me: !!(user && user.ap_id in user_ap_ids)
}
end
@@ -145,8 +150,7 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
|> render("index.json",
activities: activities,
for: user,
- as: :activity,
- skip_relationships: skip_relationships?(params)
+ as: :activity
)
else
_error ->
@@ -201,7 +205,7 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
end
end
- def mark_notifications_as_read(%{assigns: %{user: user}} = conn, %{"max_id" => max_id} = params) do
+ def mark_notifications_as_read(%{assigns: %{user: user}} = conn, %{"max_id" => max_id}) do
with notifications <- Notification.set_read_up_to(user, max_id) do
notifications = Enum.take(notifications, 80)
@@ -209,8 +213,7 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
|> put_view(NotificationView)
|> render("index.json",
notifications: notifications,
- for: user,
- skip_relationships: skip_relationships?(params)
+ for: user
)
end
end