TwitterAPI: Add network hiding.

This commit is contained in:
lain 2018-12-05 19:22:40 +01:00
commit 839526a913
3 changed files with 27 additions and 2 deletions

View file

@ -135,7 +135,8 @@ defmodule Pleroma.User.Info do
:locked,
:no_rich_text,
:default_scope,
:banner
:banner,
:hide_network
])
end

View file

@ -431,7 +431,7 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
defp build_info_cng(user, params) do
info_params =
["no_rich_text", "locked"]
["no_rich_text", "locked", "hide_network"]
|> Enum.reduce(%{}, fn key, res ->
if value = params[key] do
Map.put(res, key, value == "true")