From dbe5dbaf1f4fad2ead5bc67683c98b5b9f488167 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 14 Nov 2022 16:26:51 +0200 Subject: [PATCH] ref --- application/Espo/Tools/Notification/Service.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/Espo/Tools/Notification/Service.php b/application/Espo/Tools/Notification/Service.php index 4a5781cb32..670070650c 100644 --- a/application/Espo/Tools/Notification/Service.php +++ b/application/Espo/Tools/Notification/Service.php @@ -40,6 +40,7 @@ use Espo\Core\AclManager; use Espo\Core\WebSocket\Submission; use Espo\Core\Utils\DateTime as DateTimeUtil; +use Espo\Modules\Crm\Entities\CaseObj; use Espo\ORM\EntityManager; class Service @@ -96,7 +97,7 @@ class Service ->create(); $userList = $this->entityManager - ->getRDBRepository('User') + ->getRDBRepository(User::ENTITY_TYPE) ->select(['id', 'type']) ->where([ 'isActive' => true, @@ -164,7 +165,9 @@ class Service if ($user->isPortal()) { if ($note->getRelatedType()) { /** @todo Revise. */ - return $note->getRelatedType() === Email::ENTITY_TYPE && $note->getParentType() === 'Case'; + return + $note->getRelatedType() === Email::ENTITY_TYPE && + $note->getParentType() === CaseObj::ENTITY_TYPE; } return true;