• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/im/notification.php
  • Класс: Bitrix\Sender\Integration\Im\Notification
  • Вызов: Notification::send
public function send()
{
	if (!static::canUse())
	{
		return;
	}

	if (count($this->to) === 0 || !$this->message)
	{
		return;
	}

	foreach ($this->to as $userId)
	{
		$fields = array(
			"TO_USER_ID" => $userId,
			"FROM_USER_ID" => 0,
			"NOTIFY_TYPE" => IM_NOTIFY_SYSTEM,
			"NOTIFY_MODULE" => "sender",
			//"NOTIFY_EVENT" => $imNotifyEvent,
			//"NOTIFY_TAG" => $notifyTag,
			"NOTIFY_MESSAGE" => $this->message
		);
		\CIMNotify::Add($fields);
	}
}