projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59a703f
)
user info: allow formdata for notification settings like every other API
author
William Pitcock
<nenolod@dereferenced.org>
Sat, 25 May 2019 05:54:02 +0000
(
05:54
+0000)
committer
William Pitcock
<nenolod@dereferenced.org>
Sat, 25 May 2019 05:54:02 +0000
(
05:54
+0000)
lib/pleroma/user/info.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/user/info.ex
b/lib/pleroma/user/info.ex
index fb4cf3cc3992a99c4452fa5562f89ed5961e4c36..b0bfdf4f4c0fbf70d253d680a561bded96997788 100644
(file)
--- 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)