Skip to content

Commit b53501d

Browse files
committed
Fix sending notifications that aren't ours, such as the password reset email
Summary: Didn't realize the password reset message went through the notification system. Test Plan: - Attempt to reset a password - Ensure it goes through - Cause some other notifications - Ensure they go through Reviewers: sethetter Reviewed By: sethetter Differential Revision: https://phabricator.opengovfoundation.org/D196
1 parent c8180ee commit b53501d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/Listeners/ShouldSendNotification.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ public function handle(NotificationSending $event)
3333
$recipient = $event->notifiable;
3434
$notification = $event->notification;
3535

36+
if (!($notification instanceof \App\Contracts\Notification)) {
37+
return;
38+
}
39+
3640
// determine if the recipient *is allowed to receive* notifications from
3741
// this kind of event, i.e., if the event is not in the set of valid
3842
// notifications for the recipient, then skip it

0 commit comments

Comments
 (0)