• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Message.php
  • Класс: BitrixImV2Message
  • Вызов: Message::hasAccess
public function hasAccess(?int $userId = null): bool
{
	$userId ??= $this->getContext()->getUserId();
	$chat = $this->getChat();

	return $this->getId() && $chat->hasAccess($userId) && $chat->getStartId($userId) <= $this->getId();
}