notification improvements 2
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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')).")";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user