chore: Disable email notifications for unconfirmed users (#10964)
- disable email notifications if the user hasn't confirmed the email yet, as there is potential chance for the emails to bounce
This commit is contained in:
@@ -4,6 +4,8 @@ class Notification::EmailNotificationService
|
||||
def perform
|
||||
# don't send emails if user read the push notification already
|
||||
return if notification.read_at.present?
|
||||
# don't send emails if user is not confirmed
|
||||
return if notification.user.confirmed_at.nil?
|
||||
return unless user_subscribed_to_notification?
|
||||
|
||||
# TODO : Clean up whatever happening over here
|
||||
|
||||
Reference in New Issue
Block a user