AccountController: Make setting accepts_chat_messages possible.

This commit is contained in:
lain 2020-07-03 15:54:25 +02:00
commit e3b5559780
4 changed files with 18 additions and 4 deletions

View file

@ -160,7 +160,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountController do
:show_role,
:skip_thread_containment,
:allow_following_move,
:discoverable
:discoverable,
:accepts_chat_messages
]
|> Enum.reduce(%{}, fn key, acc ->
Maps.put_if_present(acc, key, params[key], &{:ok, truthy_param?(&1)})