• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Chat/PrivateChat.php
  • Класс: BitrixImV2ChatPrivateChat
  • Вызов: PrivateChat::sendPushReadSelf
protected function sendPushReadSelf(MessageCollection $messages, int $lastId, int $counter): void
{
	$companionId = $this->getDialogId();
	BitrixPullEvent::add($this->getContext()->getUserId(), [
		'module_id' => 'im',
		'command' => 'readMessage',
		'params' => [
			'dialogId' => $companionId,
			'chatId' => $this->getChatId(),
			'senderId' => $this->getContext()->getUserId(),
			'id' => (int)$companionId,
			'userId' => (int)$companionId,
			'lastId' => $lastId,
			'counter' => $counter,
			'muted' => false,
			'unread' => Recent::isUnread($this->getContext()->getUserId(), $this->getType(), $this->getDialogId() ?? ''),
			'viewedMessages' => $messages->getIds(),
		],
		'extra' => BitrixImCommon::getPullExtra()
	]);
}