11 private static function addViewedComment($params = [])
13 if (!is_array($params))
18 $taskId = (isset($params[
'taskId']) ? intval($params[
'taskId']) : 0);
19 $commentId = (isset($params[
'commentId']) ? intval($params[
'commentId']) : 0);
28 if (!isset(self::$viewedCommentsCache[$taskId]))
30 self::$viewedCommentsCache[$taskId] = [];
33 if (in_array($commentId, self::$viewedCommentsCache[$taskId]))
38 self::$viewedCommentsCache[$taskId][] = $commentId;
45 return array_keys(self::$viewedCommentsCache);
51 EventResult::UNDEFINED,
61 || intval($commentId) <= 0
67 self::addViewedComment([
69 'commentId' => $commentId