summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2020-06-17 15:37:27 +0000
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2021-03-10 16:46:56 +0300
commit9f33c5fe6337eebe9947ad88fa09a28460708b9e (patch)
treeebc2e4d346686c3625e714a283609318f54f1855
parent46492a2aee53e7d0849faae6837423da3812b993 (diff)
Apply suggestion to lib/pleroma/web/masto_fe_controller.ex
-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