aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/twitter_api/controllers
diff options
context:
space:
mode:
authorRoger Braun <rbraun@Bobble.local>2017-09-15 14:39:32 +0200
committerRoger Braun <rbraun@Bobble.local>2017-09-15 14:39:32 +0200
commitc20530e7080e7c37f33a944933a5a84c95f0e387 (patch)
treecf6936c74a0a9fc4323164244b25f4efd029dca9 /lib/pleroma/web/twitter_api/controllers
parent50409326a853db7bd9f538f0ddbec805c134920f (diff)
downloadpleroma-c20530e7080e7c37f33a944933a5a84c95f0e387.tar.gz
Add configuration option for registrations.
Diffstat (limited to 'lib/pleroma/web/twitter_api/controllers')
-rw-r--r--lib/pleroma/web/twitter_api/controllers/util_controller.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
index 25ed912c9..32910d92c 100644
--- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex
+++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
@@ -16,6 +16,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
<name>#{Keyword.get(@instance, :name)}</name>
<site>#{Web.base_url}</site>
<textlimit>#{Keyword.get(@instance, :limit)}</textlimit>
+ <closed>#{!Keyword.get(@instance, :registrations_open)}</closed>
</site>
</config>
"""
@@ -27,7 +28,8 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
site: %{
name: Keyword.get(@instance, :name),
server: Web.base_url,
- textlimit: Keyword.get(@instance, :limit)
+ textlimit: Keyword.get(@instance, :limit),
+ closed: if(Keyword.get(@instance, :registrations_open), do: "0", else: "1")
}
})
end