Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
chat.php
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Controller
;
4
5
use
Bitrix\Im
;
6
use
Bitrix\Main\Loader
;
7
8
class
Chat
extends
Base
9
{
10
public
function
createAction
(array $userIds): int
11
{
12
if
(!Loader::includeModule(
'im'
))
13
{
14
return
0;
15
}
16
17
$result = Im\V2\Chat\ChatFactory::getInstance()->addChat([
18
'TYPE'
=> Im\V2\Chat::IM_TYPE_CHAT,
19
'SKIP_ADD_MESSAGE'
=>
'Y'
,
20
'AUTHOR_ID'
=> $this->userId,
21
'USERS'
=> $userIds,
22
]);
23
24
return
$result->getData()[
'RESULT'
][
'CHAT_ID'
];
25
}
26
}
Bitrix\Im\Chat
Definition
chat.php:19
Bitrix\Main\Engine\ActionFilter\Base
Definition
base.php:15
Bitrix\Main\Loader
Definition
loader.php:12
Bitrix\Socialnetwork\Controller\Chat\createAction
createAction(array $userIds)
Definition
chat.php:10
Bitrix\Im
Bitrix\Socialnetwork\Controller
Definition
base.php:3
modules
socialnetwork
lib
controller
chat.php
Создано системой
1.10.0