• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Timeline/Item/Activity/OpenLine.php
  • Класс: Bitrix\Crm\Service\Timeline\Item\Activity\OpenLine
  • Вызов: OpenLine::getTags
public function getTags(): ?array
{
	$tags = [];

	$userCode = $this->getAssociatedEntityModel()->get('PROVIDER_PARAMS')['USER_CODE'];
	$responsibleId = $this->getAssociatedEntityModel()->get('RESPONSIBLE_ID');

	// the tag will not be removed until the responsible user reads all messages
	if (
		$this->isScheduled()
		&& OpenLineManager::getChatUnReadMessages($userCode, $responsibleId) > 0
	)
	{
		$tags['notReadChat'] = new Tag(
			Loc::getMessage('CRM_TIMELINE_TAG_CHAT_NOT_READ'),
			Tag::TYPE_WARNING
		);
	}
	else if (BadgeTable::isActivityHasBadge($this->getActivityId()))
	{
		$activity = CCrmActivity::GetByID($this->getActivityId(), false);
		if (is_array($activity))
		{
			ProviderManager::syncBadgesOnActivityUpdate($this->getActivityId(), $activity);
		}
	}

	return $tags;
}