summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2021-02-17 09:41:40 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2021-03-10 03:55:08 +0100
commit3732c51cf7921baa2d85cf8c5f0efcc364ed9397 (patch)
tree2146de3e4a2ee89fd76b52531489b61797081772
parent7f0b991ad641fba571b772653ec3dfacf0c5ed70 (diff)
TwitterAPI: Remove unused read notification function
-rw-r--r--lib/pleroma/web/twitter_api/controllers/util_controller.ex13
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
index 940a645bb..60266aaab 100644
--- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex
+++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
@@ -10,7 +10,6 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
alias Pleroma.Config
alias Pleroma.Emoji
alias Pleroma.Healthcheck
- alias Pleroma.Notification
alias Pleroma.User
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.Plugs.OAuthScopesPlug
@@ -30,7 +29,6 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
]
)
- plug(OAuthScopesPlug, %{scopes: ["write:notifications"]} when action == :notifications_read)
def remote_subscribe(conn, %{"nickname" => nick, "profile" => _}) do
with %User{} = user <- User.get_cached_by_nickname(nick),
@@ -62,17 +60,6 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
end
end
- def notifications_read(%{assigns: %{user: user}} = conn, %{"id" => notification_id}) do
- with {:ok, _} <- Notification.read_one(user, notification_id) do
- json(conn, %{status: "success"})
- else
- {:error, message} ->
- conn
- |> put_resp_content_type("application/json")
- |> send_resp(403, Jason.encode!(%{"error" => message}))
- end
- end
-
def frontend_configurations(conn, _params) do
render(conn, "frontend_configurations.json")
end