Apply suggestion to lib/pleroma/web/masto_fe_controller.ex
This commit is contained in:
parent
46492a2aee
commit
9f33c5fe63
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user