aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/pleroma/web/masto_fe_controller.ex8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/pleroma/web/masto_fe_controller.ex b/lib/pleroma/web/masto_fe_controller.ex
index 6ec6fa951..5a02f2f4d 100644
--- a/lib/pleroma/web/masto_fe_controller.ex
+++ b/lib/pleroma/web/masto_fe_controller.ex
@@ -56,12 +56,8 @@ defmodule Pleroma.Web.MastoFEController do
with {:ok, user} <- User.mastodon_settings_update(user, settings) do
if settings = get_in(user.settings, ["notifications", "shows"]) do
notify_settings =
- Enum.map(settings, fn {k, v} ->
- if v == false do
- k
- end
- end)
- |> Enum.filter(& &1)
+ Enum.map(settings, fn {k, v} -> if v == false, do: k end)
+ |> Enum.reject(&is_nil/1)
notification_settings =
user.notification_settings