Skip to content

Commit

Permalink
Fix email delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
chrztoph committed Sep 23, 2023
1 parent 752b2ee commit 1507cc0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/organization_invites_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def create
else
organization_invite.save!

UserMailer.invite(email, current_user.username, Texterify.on_premise?).deliver_later
UserMailer.invite(email, current_user.username, Texterify.on_premise?).deliver_now

render json: { error: false, message: 'OK' }
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/project_invites_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def create
else
project_invite.save!

UserMailer.invite(email, current_user.username, Texterify.on_premise?).deliver_later
UserMailer.invite(email, current_user.username, Texterify.on_premise?).deliver_now

render json: { error: false, message: 'OK' }
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def confirmation_required?
# https://www.rubydoc.info/github/plataformatec/devise/Devise/Models/Confirmable:after_confirmation
def after_confirmation
if Texterify.cloud?
UserMailer.welcome(email, username).deliver_later
UserMailer.welcome(email, username).deliver_now
end

# Add user to organizations with open invites.
Expand Down
2 changes: 1 addition & 1 deletion app/workers/trial_ending_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def perform(*_args)
sent_email.user_id = owner.id
sent_email.save!

SubscriptionMailer.trial_expiring(owner, organization).deliver_later
SubscriptionMailer.trial_expiring(owner, organization).deliver_now
end
end
end
Expand Down

0 comments on commit 1507cc0

Please sign in to comment.