From: William Pitcock Date: Sat, 25 May 2019 05:54:02 +0000 (+0000) Subject: user info: allow formdata for notification settings like every other API X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=e7e2e7a1a633e2f7e493d040e290c931320d8cc8;p=akkoma user info: allow formdata for notification settings like every other API --- diff --git a/lib/pleroma/user/info.ex b/lib/pleroma/user/info.ex index fb4cf3cc3..b0bfdf4f4 100644 --- a/lib/pleroma/user/info.ex +++ b/lib/pleroma/user/info.ex @@ -75,6 +75,11 @@ defmodule Pleroma.User.Info do end def update_notification_settings(info, settings) do + settings = + settings + |> Enum.map(fn {k, v} -> {k, v in [true, "true", "True", "1"]} end) + |> Map.new() + notification_settings = info.notification_settings |> Map.merge(settings)