Skip to content

Commit

Permalink
Merge pull request #280 from datafruits/send-dj-email-when-role-added
Browse files Browse the repository at this point in the history
send welcome email when dj role added
  • Loading branch information
mcfiredrill authored Aug 10, 2023
2 parents 26504f0 + 2d5986e commit dc02a7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/user/roles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ def add_role new_role
Notification.create! notification_type: "#{new_role}_badge_award", user_id: self.id, send_to_chat: true
ActiveSupport::Notifications.instrument 'user.badge_award', username: self.username, badge: new_role
end
if new_role === "dj"
DjAccountMailer.welcome_email(self, '', self.radios.first).deliver_later
end
end
end

Expand Down

0 comments on commit dc02a7d

Please sign in to comment.