-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller_site.php
More file actions
36 lines (26 loc) · 1.32 KB
/
controller_site.php
File metadata and controls
36 lines (26 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
use \Bitrix\Main\Loader;
Loader::includeModule('ithive.openlinesadditional');
Loader::includeModule("imconnector");
Loader::includeModule("imopenlines");
if (!empty($user_id)) {
// обработка входящих данных(на выходе подготовленные данные для сообщения)
$chatParams = \ITHive\OpenLinesAdditional\Actions::dataPrepareSite($data);
/*
* проверка пользователя на принадлежность к админам группы
*/
// $isAdminVk = \ITHive\OpenLinesAdditional\Vkattachment::groupManagementVk($user_id);
/*
* 'notMessage' - проверка что сообщение не отправлено с портала
*/
// if (empty($isAdminVk)) {
$idOpenLine = \ITHive\OpenLinesAdditional\Actions::getOlId();
$chatRowAdded = \ITHive\OpenLinesAdditional\Actions::saveChatLink($chatParams['params']["userId"],
$chatParams['params']["postId"], $chatParams['params']["chatId"], "ST", $chatParams['params']["commentId"]);
$openLineMess = \Bitrix\ImConnector\CustomConnectors::sendMessages('ithive_connect', $idOpenLine,
[$chatParams['messenge']]);
if (\Bitrix\Main\Loader::includeModule('pull')) {
\Bitrix\Pull\Event::send();
}
// }
}