Skip to content

Commit

Permalink
More fixes for email notification (#5566)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad authored Nov 22, 2023
1 parent b360602 commit cc9ab54
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def create
activation_url: activate_account_url(token), base_url: request.base_url,
provider: current_provider).activate_account_email.deliver_later

UserMailer.with(user:, admin_panel_url:, provider: current_provider).new_user_signup_email.deliver_later
UserMailer.with(user:, admin_panel_url:, base_url: request.base_url, provider: current_provider).new_user_signup_email.deliver_later
end

create_default_room(user)
Expand Down
5 changes: 2 additions & 3 deletions app/controllers/api/v1/verify_account_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ class VerifyAccountController < ApiController
def create
token = @user.generate_activation_token!

UserMailer.with(user: @user,
activation_url: activate_account_url(token), base_url: request.base_url,
provider: current_provider).activate_account_email.deliver_later
UserMailer.with(user: @user, activation_url: activate_account_url(token),
base_url: request.base_url, provider: current_provider).activate_account_email.deliver_later

render_data status: :ok
end
Expand Down
5 changes: 4 additions & 1 deletion app/controllers/external_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def create_user
create_default_room(user)

# Send admins an email if smtp is enabled
UserMailer.with(user:, admin_panel_url:, provider: current_provider).new_user_signup_email.deliver_later if ENV['SMTP_SERVER'].present?
if ENV['SMTP_SERVER'].present?
UserMailer.with(user:, admin_panel_url:, base_url: request.base_url,
provider: current_provider).new_user_signup_email.deliver_later
end
end

if SettingGetter.new(setting_name: 'ResyncOnLogin', provider:).call
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ en:
valid_invitation: The invitation is valid for 24 hours.
sign_up: Sign Up
new_user_signup:
new_user: New User Signup
new_user: New BigBlueButton User Signup
new_user_description: A new user has signed up to use BigBlueButton.
name: "Name: %{name}"
email: "Email: %{email}"
Expand Down

0 comments on commit cc9ab54

Please sign in to comment.