Пример #1
0
 public static function Add($arFields)
 {
     if (!isset($arFields['MESSAGE_TYPE']) || !in_array($arFields['MESSAGE_TYPE'], array(IM_MESSAGE_CHAT, IM_MESSAGE_OPEN))) {
         $arFields['MESSAGE_TYPE'] = IM_MESSAGE_PRIVATE;
     }
     if (isset($arFields['MESSAGE_MODULE'])) {
         $arFields['NOTIFY_MODULE'] = $arFields['MESSAGE_MODULE'];
     } else {
         $arFields['NOTIFY_MODULE'] = "im";
     }
     return CIMMessenger::Add($arFields);
 }
Пример #2
0
	public static function Add($arFields)
	{
		if (isset($arFields['MESSAGE_TYPE']) && $arFields['MESSAGE_TYPE'] == IM_MESSAGE_GROUP)
			$arFields['MESSAGE_TYPE'] = IM_MESSAGE_GROUP;
		else
			$arFields['MESSAGE_TYPE'] = IM_MESSAGE_PRIVATE;

		if (isset($arFields['MESSAGE_MODULE']))
			$arFields['NOTIFY_MODULE'] = $arFields['MESSAGE_MODULE'];
		else
			$arFields['NOTIFY_MODULE'] = "im";

		return CIMMessenger::Add($arFields);
	}
Пример #3
0
 public static function AddMessage($arFields)
 {
     $arFields['MESSAGE_TYPE'] = isset($arParams['MESSAGE_TYPE']) && in_array($arParams['MESSAGE_TYPE'], array(IM_MESSAGE_OPEN, IM_MESSAGE_CHAT)) ? $arParams['MESSAGE_TYPE'] : IM_MESSAGE_CHAT;
     return CIMMessenger::Add($arFields);
 }
Пример #4
0
	public static function Add($arFields)
	{
		$arFields['MESSAGE_TYPE'] = IM_MESSAGE_SYSTEM;

		return CIMMessenger::Add($arFields);
	}
Пример #5
0
 public static function AddMessage($arFields)
 {
     $arFields['MESSAGE_TYPE'] = IM_MESSAGE_GROUP;
     return CIMMessenger::Add($arFields);
 }
Пример #6
0
 public static function AddGeneralMessage($arFields)
 {
     $arFields['MESSAGE_TYPE'] = IM_MESSAGE_OPEN;
     $arFields['TO_CHAT_ID'] = self::GetGeneralChatId();
     return CIMMessenger::Add($arFields);
 }