diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-09 18:05:44 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-09 18:05:44 +0300 |
commit | 14a49a04837b0dc5a0d72dd7c5b4dfa482801e7c (patch) | |
tree | 3eb096cd798420352ecdc2f3f5ea91b01c6f6bdb /lib/pleroma/web/pleroma_api | |
parent | b2924ab1fbba4e6add15030cf8444d2d3f0cfe0c (diff) | |
download | pleroma-14a49a04837b0dc5a0d72dd7c5b4dfa482801e7c.tar.gz |
[#2456] Dropped support for embedded `pleroma/account/relationship` in statuses and notifications.
Diffstat (limited to 'lib/pleroma/web/pleroma_api')
-rw-r--r-- | lib/pleroma/web/pleroma_api/controllers/account_controller.ex | 5 | ||||
-rw-r--r-- | lib/pleroma/web/pleroma_api/controllers/pleroma_api_controller.ex | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/lib/pleroma/web/pleroma_api/controllers/account_controller.ex b/lib/pleroma/web/pleroma_api/controllers/account_controller.ex index be7477867..3c6a951b9 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 @@ -139,8 +139,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 80ecdf67e..b61a6791b 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 @@ -151,8 +151,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 +206,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 +214,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 |