Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
Stopping the propagation of an event in case no one subscribed for event
Browse files Browse the repository at this point in the history
  • Loading branch information
herpaderpaldent committed Mar 24, 2019
1 parent 9342777 commit c75a255
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Listeners/GroupApplicationNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function handle(GroupApplication $event)

if($recipients->isEmpty()){
logger()->debug('No Receiver found for ' . AbstractSeatGroupApplicationNotification::getTitle() . ' Notification. This job is going to be deleted.');
$this->delete();
return false;
}

$recipients->groupBy('driver')
Expand Down
2 changes: 1 addition & 1 deletion src/Listeners/GroupSyncFailedNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function handle(GroupSyncFailed $event)

if($recipients->isEmpty()){
logger()->debug('No Receiver found for ' . AbstractSeatGroupErrorNotification::getTitle() . ' Notification. This job is going to be deleted.');
$this->delete();
return false;
}

$recipients->groupBy('driver')
Expand Down
2 changes: 1 addition & 1 deletion src/Listeners/GroupSyncedNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function handle(GroupSynced $event)

if($recipients->isEmpty()){
logger()->debug('No Receiver found for ' . AbstractSeatGroupSyncNotification::getTitle() . ' Notification. This job is going to be deleted.');
$this->delete();
return false;
}

$recipients->groupBy('driver')
Expand Down
2 changes: 1 addition & 1 deletion src/Listeners/MissingRefreshTokenNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function handle(MissingRefreshToken $event)

if($recipients->isEmpty()){
logger()->debug('No Receiver found for ' . AbstractMissingRefreshTokenNotification::getTitle() . ' Notification. This job is going to be deleted.');
$this->delete();
return false;
}

$recipients->groupBy('driver')
Expand Down

0 comments on commit c75a255

Please sign in to comment.