Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix notification sent to parent when parent is a template - could pos…
Browse files Browse the repository at this point in the history
…sibly break the hooks loop, preventing email.
  • Loading branch information
cdujeu committed May 29, 2017
1 parent b110acf commit 21d3edc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/plugins/core.notifications/NotificationCenter.php
Expand Up @@ -140,6 +140,8 @@ public function persistNotificationToAlerts(Notification &$notification)
));
if($notification->getNode()->getRepository() != null && $notification->getNode()->getRepository()->hasParent()){
$parentRepoId = $notification->getNode()->getRepository()->getParentId();
$parentRepo = RepositoryService::getRepositoryById($parentRepoId);
if($parentRepo === null || $parentRepo->isTemplate()) return;
Controller::applyHook("msg.instant",array(
$notification->getNode()->getContext()->withRepositoryId($parentRepoId),
"<reload_user_feed/>",
Expand Down

0 comments on commit 21d3edc

Please sign in to comment.