[#114] Routes and config for `confirm_email` and `email_invite` (Twitter API).
authorIvan Tashkinov <ivantashkinov@gmail.com>
Wed, 12 Dec 2018 17:15:43 +0000 (20:15 +0300)
committerIvan Tashkinov <ivantashkinov@gmail.com>
Wed, 12 Dec 2018 17:15:43 +0000 (20:15 +0300)
lib/pleroma/web/router.ex
lib/pleroma/web/twitter_api/controllers/util_controller.ex
lib/pleroma/web/twitter_api/twitter_api_controller.ex

index 6253a28dbf8b9d90dd727097ecdf81fc02712068..6a2e0d6c4da55112e76996d01a07c8c713d217ec 100644 (file)
@@ -278,6 +278,7 @@ defmodule Pleroma.Web.Router do
 
     post("/account/register", TwitterAPI.Controller, :register)
     post("/account/password_reset", TwitterAPI.Controller, :password_reset)
+    get("/account/confirm_email", TwitterAPI.Controller, :confirm_email)
 
     get("/search", TwitterAPI.Controller, :search)
     get("/statusnet/tags/timeline/:tag", TwitterAPI.Controller, :public_and_external_timeline)
@@ -312,6 +313,8 @@ defmodule Pleroma.Web.Router do
     post("/account/update_profile_banner", TwitterAPI.Controller, :update_banner)
     post("/qvitter/update_background_image", TwitterAPI.Controller, :update_background)
 
+    post("/email_invite", TwitterAPI.Controller, :email_invite)
+
     get("/statuses/home_timeline", TwitterAPI.Controller, :friends_timeline)
     get("/statuses/friends_timeline", TwitterAPI.Controller, :friends_timeline)
     get("/statuses/mentions", TwitterAPI.Controller, :mentions_timeline)
index b1e4c77e86ad4b0a361218fa0588c714b1cb3408..cacfbbf918ade744b83c09ce39898dca3d85dd5c 100644 (file)
@@ -166,6 +166,9 @@ 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"),
+          accountActivationRequired:
+            if(Keyword.get(instance, :account_activation_required, false), do: "1", else: "0"),
+          invitesEnabled: if(Keyword.get(instance, :invites_enabled, true), do: "1", else: "0"),
           vapidPublicKey: vapid_public_key
         }
 
index 479c92381f651f00cac079c1d0d95274802a1425..911dd6a48d7671ff9b2eebb91534884b0dcc1d53 100644 (file)
@@ -340,6 +340,10 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
     end
   end
 
+  def confirm_email(_conn, _params), do: :noop
+
+  def email_invite(_conn, _params), do: :noop
+
   def update_avatar(%{assigns: %{user: user}} = conn, params) do
     {:ok, object} = ActivityPub.upload(params, type: :avatar)
     change = Changeset.change(user, %{avatar: object.data})