aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2020-06-29 12:07:00 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2021-03-10 16:46:57 +0300
commitaf6725121f909c7e2f03a6aafbcc4a54f93500c5 (patch)
treeb4a134519314a2ad2a9321899edebdb66e762159 /lib
parent5361e40162e5431a3d22fe71128facedaebd38ce (diff)
downloadpleroma-af6725121f909c7e2f03a6aafbcc4a54f93500c5.tar.gz
removing saving settings in mastofe
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/masto_fe_controller.ex16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/pleroma/web/masto_fe_controller.ex b/lib/pleroma/web/masto_fe_controller.ex
index 0f4c413d8..e788ab37a 100644
--- a/lib/pleroma/web/masto_fe_controller.ex
+++ b/lib/pleroma/web/masto_fe_controller.ex
@@ -53,21 +53,7 @@ defmodule Pleroma.Web.MastoFEController do
@doc "PUT /api/web/settings: Backend-obscure settings blob for MastoFE, don't parse/reuse elsewhere"
def put_settings(%{assigns: %{user: user}} = conn, %{"data" => settings} = _params) do
- with {:ok, user} <- User.mastodon_settings_update(user, settings) do
- if settings = get_in(user.settings, ["notifications", "shows"]) do
- notify_settings =
- settings
- |> Enum.map(fn {k, v} -> if v == false, do: k end)
- |> Enum.reject(&is_nil/1)
-
- notification_settings =
- user.notification_settings
- |> Map.from_struct()
- |> Map.put(:exclude_types, notify_settings)
-
- User.update_notification_settings(user, notification_settings)
- end
-
+ with {:ok, _} <- User.mastodon_settings_update(user, settings) do
json(conn, %{})
else
e ->