Merge remote-tracking branch 'upstream/develop' into admin-create-users
authorSachin Joshi <satchin.joshi@gmail.com>
Sat, 1 Jun 2019 05:57:37 +0000 (11:42 +0545)
committerSachin Joshi <satchin.joshi@gmail.com>
Sat, 1 Jun 2019 05:57:37 +0000 (11:42 +0545)
1  2 
CHANGELOG.md
lib/pleroma/user.ex
lib/pleroma/web/admin_api/admin_api_controller.ex
lib/pleroma/web/router.ex
test/web/admin_api/admin_api_controller_test.exs

diff --cc CHANGELOG.md
Simple merge
index 722e8ff6b0736d94bf6b364bd47336f7dee3100c,474cd8c1a1b668026271290b253713b321bdaf6b..6abcb7288f5f3237a80cb212409656430cc153ef
@@@ -276,15 -277,9 +277,15 @@@ defmodule Pleroma.User d
    @doc "Inserts provided changeset, performs post-registration actions (confirmation email sending etc.)"
    def register(%Ecto.Changeset{} = changeset) do
      with {:ok, user} <- Repo.insert(changeset),
 -         {:ok, user} <- autofollow_users(user),
 +         {:ok, user} <- post_register_action(user) do
 +      {:ok, user}
 +    end
 +  end
 +
 +  def post_register_action(%User{} = user) do
 +    with {:ok, user} <- autofollow_users(user),
           {:ok, user} <- set_cache(user),
-          {:ok, _} <- Pleroma.User.WelcomeMessage.post_welcome_message_to_user(user),
+          {:ok, _} <- User.WelcomeMessage.post_welcome_message_to_user(user),
           {:ok, _} <- try_send_confirmation_email(user) do
        {:ok, user}
      end
Simple merge