1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
GroupPushService.php
См. документацию.
1<?php
2
4
7
9{
10 public function sendPush(array $counters = []): void
11 {
12 if (!$this->isPullEnable() || !$this->sendingConfig->addRecent())
13 {
14 return;
15 }
16
17 $chat = $this->message->getChat();
18
19 if ($chat->getRelations()->hasUser($this->message->getAuthorId(), $chat->getId()))
20 {
21 \CPushManager::DeleteFromQueueBySubTag($this->message->getAuthorId(), 'IM_MESS');
22 }
23
24 $pullMessage = [
25 'module_id' => 'im',
26 'command' => 'messageChat',
27 'params' => $this->pushFormatter->format(),
29 ];
30
31 $watchPullMessage = $pullMessage;
32 $watchPullMessage['params']['message']['params']['NOTIFY'] = 'N';
33 $watchPullMessage['extra']['is_shared_event'] = true;
34 $watchPullMessage['params']['recentConfig']['sections'] = $chat->getRecentSectionsForGuest();
35 if ($chat->needToSendPublicPull())
36 {
37 \CPullWatch::AddToStack('IM_PUBLIC_'. $chat->getChatId(), $watchPullMessage);
38 }
39 if ($chat->getType() === Chat::IM_TYPE_OPEN_CHANNEL)
40 {
41 Chat\OpenChannelChat::sendSharedPull($watchPullMessage);
42 }
43 if ($chat->getType() === \Bitrix\Im\V2\Chat::IM_TYPE_COMMENT)
44 {
45 \CPullWatch::AddToStack('IM_PUBLIC_COMMENT_' . $chat->getParentChatId(), $watchPullMessage);
46 }
47
48 $groups = self::getEventGroupsByCounters($pullMessage, $counters);
49 foreach ($groups as $group)
50 {
51 \Bitrix\Pull\Event::add($group['users'], $group['event']);
52 $this->mobilePush->sendForGroupMessage($group);
53 }
54 }
55}
static getPullExtra()
Определения common.php:127
static sendSharedPull(array $pull)
Определения OpenChannelChat.php:124
static add($recipient, array $parameters, $channelType=\CPullChannel::TYPE_PRIVATE)
Определения event.php:22
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$groups
Определения options.php:30
Определения ActionUuid.php:3
$counters
Определения options.php:100