notification improvements 2

This commit is contained in:
yuri
2016-06-29 16:54:23 +03:00
parent 61c9d07ad8
commit 0dc9129d79
2 changed files with 2 additions and 6 deletions
-3
View File
@@ -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);
+2 -3
View File
@@ -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')).")";
}