• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/call/calluser.php
  • Класс: BitrixImCallCallUser
  • Вызов: CallUser::isActive
public function isActive()
{
	$seenRecently = false;

	if($this->lastSeen instanceof DateTime)
	{
		$now = time();
		$delta = $now - $this->lastSeen->getTimestamp();
		$seenRecently = $delta <= static::LAST_SEEN_THRESHOLD;
	}

	return in_array($this->state, [static::STATE_READY, static::STATE_CALLING]) && $seenRecently;
}