with true <-
Pleroma.Config.get([:instance, :invites_enabled]) &&
!Pleroma.Config.get([:instance, :registrations_open]),
- {:ok, invite_token} <- Pleroma.UserInviteToken.create_token(),
+ {:ok, invite_token} <- UserInviteToken.create_invite(),
email <-
- Pleroma.UserEmail.user_invitation_email(user, invite_token, email, params["name"]),
- {:ok, _} <- Pleroma.Mailer.deliver(email) do
+ Pleroma.Emails.UserEmail.user_invitation_email(
+ user,
+ invite_token,
+ email,
+ params["name"]
+ ),
+ {:ok, _} <- Pleroma.Emails.Mailer.deliver(email) do
json_response(conn, :no_content, "")
end
end