• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/counter.php
  • Класс: BitrixImCounter
  • Вызов: Counter::getDialogCounter
static function getDialogCounter($opponentUserId, $userId = null)
{
	$userId = Common::getUserId($userId);
	$opponentUserId = intval($opponentUserId);
	if ($userId <= 0 || $opponentUserId <= 0)
	{
		return false;
	}

	$counters = self::get($userId);

	return intval($counters['DIALOG'][$opponentUserId]);
}