• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/Configuration/Manager.php
  • Класс: BitrixImConfigurationManager
  • Вызов: Manager::getNotifyAccess
static function getNotifyAccess($userId, $moduleId, $eventId, $type)
{
	$generalSettings = General::createWithUserId($userId);
	$notifyScheme = $generalSettings->getValue('notifyScheme');

	if ($notifyScheme !== 'expert')
	{
		if ($type === Notification::SITE)
		{
			return $generalSettings->getValue('notifySchemeSendSite');
		}
		if ($type === Notification::MAIL)
		{
			return $generalSettings->getValue('notifySchemeSendEmail');
		}
		if ($type === Notification::PUSH)
		{
			return $generalSettings->getValue('notifySchemeSendPush');
		}
		if ($type === Notification::XMPP)
		{
			return $generalSettings->getValue('notifySchemeSendXmpp');
		}
	}

	return (new Notification($moduleId, $eventId))->isAllowed($userId, $type);
}