From 9f33c5fe6337eebe9947ad88fa09a28460708b9e Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Wed, 17 Jun 2020 15:37:27 +0000 Subject: [PATCH] Apply suggestion to lib/pleroma/web/masto_fe_controller.ex --- lib/pleroma/web/masto_fe_controller.ex | 8 ++------ 1 file 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