public static function sendNotification($message, $userTo, $userFrom) {
if (\CModule::IncludeModule('im')) {
$arFields = array(
"MESSAGE_TYPE" => "S", // P - private chat, G - group chat, S - notification
"TO_USER_ID" => $userTo,
"FROM_USER_ID" => $userFrom,
"MESSAGE" => $message,
"NOTIFY_TYPE" => 4, // 1 - confirm, 2 - notify single from, 4 - notify single
"NOTIFY_MODULE" => "main", // module id sender (ex: xmpp, main, etc)
"NOTIFY_EVENT" => "IM_GROUP_INVITE", // module event id for search (ex, IM_GROUP_INVITE)
);
\CIMMessenger::Add($arFields);
}
}