• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Chat.php
  • Класс: BitrixImV2Chat
  • Вызов: Chat::getSelfRelation
public function getSelfRelation(): ?Relation
{
	$userId = $this->getContext()->getUserId();

	$emptyOptionsHash = md5(serialize([]));
	if (isset($this->relations[$emptyOptionsHash]))
	{
		return $this->relations[$emptyOptionsHash]->getByUserId($userId, $this->getChatId());
	}

	return $this->getRelations(['FILTER' => ['USER_ID' => $userId]])->getByUserId($userId, $this->getChatId());
}