Move exchanging of XMPP contacts to account confirmation
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Since the ejabberd service is now being enabled after the confirmation,
we also need to move the exchanging of roster contacts to that point.
This commit is contained in:
Râu Cao
2023-03-20 17:59:43 +07:00
parent 90680368fb
commit 5b46f3adf5
4 changed files with 62 additions and 36 deletions

View File

@@ -15,7 +15,6 @@ class CreateAccount < ApplicationService
if @invitation.present?
update_invitation(user.id)
exchange_xmpp_contacts if Setting.ejabberd_enabled
end
end
@@ -43,12 +42,6 @@ class CreateAccount < ApplicationService
CreateLdapUserJob.perform_later(@username, @domain, @email, hashed_pw)
end
def exchange_xmpp_contacts
#TODO enable in development when we have easy setup of ejabberd etc.
return if Rails.env.development?
XmppExchangeContactsJob.perform_later(@invitation.user, @username, @domain)
end
def create_lndhub_account(user)
#TODO enable in development when we have a local lndhub (mock?) API
return if Rails.env.development?