• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Chat.php
  • Класс: BitrixImV2Chat
  • Вызов: Chat::sendPushReadOpponent
protected function sendPushReadOpponent(MessageCollection $messages, int $lastId): array
{
	$pushMessage = [
		'module_id' => 'im',
		'command' => 'readMessageChatOpponent',
		'expiry' => 600,
		'params' => [
			'dialogId' => $this->getDialogId(),
			'chatId' => $this->chatId,
			'userId' => $this->getContext()->getUserId(),
			'userName' => $this->getContext()->getUser()->getName(),
			'lastId' => $lastId,
			'date' => (new DateTime())->format('c'),
			'viewedMessages' => $messages->getIds(),
			'chatMessageStatus' => $this->getReadService()->getChatMessageStatus($this->chatId),
		],
		'extra' => BitrixImCommon::getPullExtra()
	];
	BitrixPullEvent::add($this->getUsersForPush(), $pushMessage);

	return $pushMessage;
}