Split hide_network into hide_followers & hide_followings (fixed)
[akkoma] / lib / pleroma / web / twitter_api / views / user_view.ex
index ede3c0d2590f1dd2f36ef052abf27de767284a60..cd7c4349c7645388b40275e068cd925a799f9855 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.TwitterAPI.UserView do
@@ -96,7 +96,8 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
       "profile_image_url_profile_size" => image,
       "profile_image_url_original" => image,
       "rights" => %{
-        "delete_others_notice" => !!user.info.is_moderator
+        "delete_others_notice" => !!user.info.is_moderator,
+        "admin" => !!user.info.is_admin
       },
       "screen_name" => user.nickname,
       "statuses_count" => user_info[:note_count],
@@ -107,6 +108,8 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
       "locked" => user.info.locked,
       "default_scope" => user.info.default_scope,
       "no_rich_text" => user.info.no_rich_text,
+      "hide_followers" => user.info.hide_followers,
+      "hide_followings" => user.info.hide_followings,
       "fields" => fields,
 
       # Pleroma extension