소스 검색

user info: allow formdata for notification settings like every other API

tags/v1.1.4
William Pitcock 5 년 전
부모
커밋
e7e2e7a1a6
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. +5
    -0
      lib/pleroma/user/info.ex

+ 5
- 0
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)


불러오는 중...
취소
저장