Skip to content

Commit 7c16b1a

Browse files
committed
Merge branch 'fix_email_delivery_to_wrong_users' into 'develop'
Fixes email delivery to wrong users See merge request gtt/redmine_expo_push!4
2 parents dbc17ef + 631ed68 commit 7c16b1a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/redmine_expo_push/patches/mailer_patch.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def deliver_mail(mail, &block)
2525
next
2626
end
2727
notification ||= RedmineExpoPush::Notification.for(mail)
28-
notification.add_recipient user
28+
notification.add_recipient user if user.push_device_registered?
2929
skip_receivers << addr if user.push_skip_emails?
3030
end
3131
end

lib/redmine_expo_push/patches/user_patch.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def send_push_notifications?
2222

2323
def push_skip_emails?
2424
# only skip emails when at least one device is registered
25-
pref.push_notifications == "enabled_no_email" and push_device_registered?
25+
pref.push_notifications == "enabled_no_email"
2626
end
2727

2828
def remove_references_before_destroy

0 commit comments

Comments
 (0)