3namespace Bitrix\Im\V2\Pull;
6use Bitrix\Im\V2\Result;
23 if (!Loader::includeModule(
'pull'))
28 $basePull =
$event->getBase();
36 $chat =
$event->getTarget();
38 if ($chat !==
null && !
$event->shouldSendToOnlySpecificRecipients())
43 foreach (
$event->getPullByUsers() as $group)
45 $results[] = $this->
sendPull($group->getRecipients(), $group->getParams());
50 foreach (
$event->getMobilePushByUsers() as $group)
52 $results[] = $this->
sendPush($group->getRecipients(), $group->getParams());
63 if ($chat->needToSendPublicPull())
65 $results[] = $this->
sendByTag(
'IM_PUBLIC_'. $chat->getChatId(), $basePull);
67 if ($chat->
getType() === Chat::IM_TYPE_OPEN_CHANNEL)
71 if ($chat->
getType() === Chat::IM_TYPE_COMMENT)
73 $results[] = $this->
sendByTag(
'IM_PUBLIC_COMMENT_' . $chat->getParentChatId(), $basePull);
82 $event->shouldSendMobilePush()
static getType($chatData, bool $camelCase=true)
static sendSharedPull(array $pull)
sendByTag(string $tag, array $pull)
sendPush(array $recipients, array $push)
shouldSendMobilePush(?Chat $chat, Event $event)
static getPullEventResult(bool $isSuccess)
sendPull(array $recipients, array $pull)
processPublicSending(Chat $chat, array $basePull)
sendSharedPull(array $pull)
static merge(Result ... $results)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)