From: Ivan Tashkinov Date: Fri, 14 Dec 2018 09:37:06 +0000 (+0300) Subject: [#114] Readded `invites_enabled` config setting, updated readme. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=9666376f5f98a66f8006971d9b29b2e529b2af68;p=akkoma [#114] Readded `invites_enabled` config setting, updated readme. --- diff --git a/config/config.md b/config/config.md index 165f5d9f8..2fca5baa1 100644 --- a/config/config.md +++ b/config/config.md @@ -67,7 +67,8 @@ config :pleroma, Pleroma.Mailer, * `avatar_upload_limit`: File size limit of user’s profile avatars * `background_upload_limit`: File size limit of user’s profile backgrounds * `banner_upload_limit`: File size limit of user’s profile banners -* `registrations_open`: Enable registrations for anyone, invitations can be used when false. +* `registrations_open`: Enable registrations for anyone, invitations can be enabled when false. +* `invites_enabled`: Enable user invitations for admins (depends on `registrations_open: false`). * `federating`: Enable federation with other instances * `allow_relay`: Enable Pleroma’s Relay, which makes it possible to follow a whole instance * `rewrite_policy`: Message Rewrite Policy, either one or a list. Here are the ones available by default: diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index b1e4c77e8..fb3b99d25 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -166,7 +166,8 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do textlimit: to_string(Keyword.get(instance, :limit)), closed: if(Keyword.get(instance, :registrations_open), do: "0", else: "1"), private: if(Keyword.get(instance, :public, true), do: "0", else: "1"), - vapidPublicKey: vapid_public_key + vapidPublicKey: vapid_public_key, + invitesEnabled: if(Keyword.get(instance, :invites_enabled, false), do: "1", else: "0") } pleroma_fe = %{