1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Dialog.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
5namespace Bitrix\Socialnetwork\Collab\Integration\IM;
6
7use Bitrix\Main\Loader;
8
9class Dialog
10{
11 public static function getDialogId(int $chatId): string
12 {
13 if (!Loader::includeModule('im'))
14 {
15 return '';
16 }
17
18 if ($chatId <= 0)
19 {
20 return '';
21 }
22
23 return \Bitrix\Im\V2\Chat::getInstance($chatId)->getDialogId();
24 }
25
26 public static function getChatId(string $dialogId): int
27 {
28 if (!Loader::includeModule('im'))
29 {
30 return 0;
31 }
32
33 return (int)\Bitrix\Im\Dialog::getChatId($dialogId);
34 }
35}
Определения dialog.php:11
static getChatId($dialogId, $userId=null)
Определения dialog.php:93
static getDialogId(int $chatId)
Определения Dialog.php:11
static getChatId(string $dialogId)
Определения Dialog.php:26