- Модуль: im
- Путь к файлу: ~/bitrix/modules/im/lib/V2/Chat/PrivateChat.php
- Класс: BitrixImV2ChatPrivateChat
- Вызов: PrivateChat::sendPushUnreadSelf
protected function sendPushUnreadSelf(int $unreadToId, int $lastId, int $counter, ?array $lastMessageStatuses = null): void
{
BitrixPullEvent::add($this->getContext()->getUserId(), [
'module_id' => 'im',
'command' => 'unreadMessage',
'expiry' => 3600,
'params' => [
'dialogId' => $this->getDialogId(),
'chatId' => $this->chatId,
'userId' => (int)$this->getDialogId(),
'date' => new BitrixMainTypeDateTime(),
'counter' => $counter,
'muted' => false,
'unread' => Recent::isUnread($this->getContext()->getUserId(), $this->getType(), $this->getDialogId()),
'unreadToId' => $unreadToId,
],
'push' => ['badge' => 'Y'],
'extra' => BitrixImCommon::getPullExtra()
]);
}