notifications suprt parent

This commit is contained in:
yuri
2015-12-04 11:10:34 +02:00
parent 730e8143e7
commit 7a3e36c092
@@ -84,14 +84,14 @@ class Notifications extends \Espo\Core\Hooks\Base
$parentType = $entity->get('parentType');
$parentId = $entity->get('parentId');
$superParentType = $entity->get('superParentType');
$superParentTypeId = $entity->get('superParentTypeId');
$superParentId = $entity->get('superParentId');
$userIdList = [];
if ($parentType && $parentId) {
$userIdList = array_merge($userIdList, $this->getSubscriberIdList($parentType, $parentId));
if ($superParentType && $superParentTypeId) {
$userIdList = array_merge($userIdList, $this->getSubscriberIdList($superParentType, $superParentTypeId));
if ($superParentType && $superParentId) {
$userIdList = array_merge($userIdList, $this->getSubscriberIdList($superParentType, $superParentId));
}
} else {
$targetType = $entity->get('targetType');