diff --git a/application/Espo/Hooks/Common/Stream.php b/application/Espo/Hooks/Common/Stream.php index 4ad3c140a7..48045780bb 100644 --- a/application/Espo/Hooks/Common/Stream.php +++ b/application/Espo/Hooks/Common/Stream.php @@ -200,9 +200,6 @@ class Stream extends \Espo\Core\Hooks\Base if (in_array($userId, $userIdList)) { unset($autofollowUserIdList[$i]); } - if ($createdById === $userId) { - unset($autofollowUserIdList[$i]); - } } $autofollowUserIdList = array_values($autofollowUserIdList); diff --git a/application/Espo/Services/Notification.php b/application/Espo/Services/Notification.php index e8a4353ea8..4046ab7bd7 100644 --- a/application/Espo/Services/Notification.php +++ b/application/Espo/Services/Notification.php @@ -88,9 +88,8 @@ class Notification extends \Espo\Services\Record ))->find(); foreach ($userList as $user) { $userId = $user->id; - if (!$this->checkUserNoteAccess($user, $note)) { - continue; - } + if (!$this->checkUserNoteAccess($user, $note)) continue; + if ($note->get('createdById') === $user->id) continue; $id = uniqid(); $arr[] = "(".$pdo->quote($id).", ".$pdo->quote($encodedData).", ".$pdo->quote('Note').", ".$pdo->quote($userId).", ".$pdo->quote($now).", ".$pdo->quote($note->id).", ".$pdo->quote('Note').", ".$pdo->quote($note->get('parentId')).", ".$pdo->quote($note->get('parentType')).")"; }