29 $users = $chat->getRelations()->getUserIds();
31 if ($chat->getType() === IM_MESSAGE_PRIVATE)
33 $pullParams[
'params'][
'toUserId'] = $chat->getCompanion()->getId();
34 $pullParams[
'params'][
'fromUserId'] = $message->
getAuthorId();
38 $pullParams[
'params'][
'senderId'] = $message->
getAuthorId();
40 if ($chat->getEntityType() ===
'LINES')
46 $messageParams = $params->toPullFormat($extraParams);
47 $pullParams[
'params'][
'params'] = $messageParams;
49 \Bitrix\Pull\Event::add($users, $pullParams);
51 if ($chat->getType() === IM_MESSAGE_OPEN || $chat->getType() === IM_MESSAGE_OPEN_LINE)
53 CPullWatch::AddToStack(
'IM_PUBLIC_' . $chat->getId(), $pullParams);