From 21d3edc5b889fd700dec745f979b2d0b17c7e2c4 Mon Sep 17 00:00:00 2001 From: cdujeu Date: Mon, 29 May 2017 19:26:49 +0200 Subject: [PATCH] Fix notification sent to parent when parent is a template - could possibly break the hooks loop, preventing email. --- core/src/plugins/core.notifications/NotificationCenter.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/plugins/core.notifications/NotificationCenter.php b/core/src/plugins/core.notifications/NotificationCenter.php index 65677a34fa..b3acc1269b 100755 --- a/core/src/plugins/core.notifications/NotificationCenter.php +++ b/core/src/plugins/core.notifications/NotificationCenter.php @@ -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), "",