3namespace Bitrix\Im\V2\Chat;
5use Bitrix\Im\V2\Entity\User\User;
6use Bitrix\Im\V2\Relation\AddUsersConfig;
7use Bitrix\Im\V2\Relation\DeleteUserConfig;
8use Bitrix\Im\V2\Result;
10use Bitrix\Main\Type\DateTime;
18 return [
'openChannel'];
28 if (!$this->getExtranet())
33 $extranetUsersToAdd = [];
34 foreach ($usersToAdd as
$userId)
42 return $extranetUsersToAdd;
52 if (!Loader::includeModule(
'pull'))
57 parent::extendPullWatch();
59 if ($this->getSelfRelation() ===
null)
61 \CPullWatch::Add($this->getContext()->getUserId(),
"IM_PUBLIC_{$this->getId()}",
true);
67 $accessCodes = parent::getAccessCodesForDiskFolder();
72 $driver = \Bitrix\Disk\Driver::getInstance();
73 $rightsManager = $driver->getRightsManager();
75 'ACCESS_CODE' => $departmentCode,
76 'TASK_ID' => $rightsManager->getTaskIdByName($rightsManager::TASK_READ)
85 parent::updateStateAfterRelationsAdd($usersToAdd);
87 if (Loader::includeModule(
'pull'))
89 foreach ($usersToAdd as
$userId)
91 \CPullWatch::Delete(
$userId,
'IM_PUBLIC_' . $this->getId());
101 $relations = $this->getRelationsByUserIds($userIds);
105 $relation = $relations->getByUserId(
$userId, $this->getChatId());
108 || $relation->getNotifyBlock())
126 $pull[
'extra'][
'is_shared_event'] =
true;
134 $dateCreate = $this->getDateCreate();
136 if (!$dateCreate instanceof
DateTime)
141 return $dateCreate->getTimestamp() > $lastDay->getTimestamp();
146 return self::IM_TYPE_OPEN_CHANNEL;
151 $checkResult = parent::checkAccessInternal(
$userId);
153 if ($checkResult->isSuccess())
172 if (Loader::includeModule(
'pull'))
174 \CPullWatch::Add(
$userId, static::PULL_TAG_SHARED_LIST,
true);
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
add(array $params, ?Context $context=null)
checkAccessInternal(int $userId)
sendMessageUsersAdd(array $usersToAdd, AddUsersConfig $config)
getRecentSectionsForGuest()
updateStateAfterRelationsAdd(array $usersToAdd)
getExtranetUsersToAdd(array $usersToAdd)
getAccessCodesForDiskFolder()
static extendPullWatchToCommonList(?int $userId=null)
const PULL_TAG_SHARED_LIST
static sendSharedPull(array $pull)
sendMessageUserDelete(int $userId, DeleteUserConfig $config)
filterUsersToMention(array $userIds)
static GetTopDepartmentCode()
static GetNotifyAccess($userId, $moduleId, $eventId, $clientId)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)