Merge remote-tracking branch 'remotes/origin/develop' into restricted-relations-embedding
[akkoma] / lib / pleroma / web / pleroma_api / controllers / pleroma_api_controller.ex
index 80ecdf67e43755252fb590301a2ce3f067134711..e834133b27100724f1cf75c9202bb0f08f8946c0 100644 (file)
@@ -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
@@ -73,8 +73,7 @@ defmodule Pleroma.Web.PleromaAPI.PleromaAPIController do
                 AccountView.render("index.json", %{
                   users: users,
                   for: user,
-                  as: :user,
-                  skip_relationships: true
+                  as: :user
                 }),
               me: !!(user && user.ap_id in user_ap_ids)
             }
@@ -151,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 ->
@@ -207,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)
 
@@ -215,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