Documentation

AddByUsers

CPullStack::AddByUsers(
   $arrayUserId, Array(
      'module_id' => 'im',
      'command' => 'ping',
      'params' => Array(
         'message' => 'test'
   ),
));

This method sends messages to a group of users. Static method.

This method selects all user channels at once; then, the N of messages is sent in packages. (Number of sent messages depends on Push&Pull module settings).

The method can send push-notifications to mobile phones without sending notifications to a messenger. To achieve that, Push key with push-notification parameters must be added to a parameter array (for example, the same way is used to send push-notifications regarding new messages in chat).

Parameters

Parameter Description Available from version
UserId Array of message recipients
module_id Module that sends a command
command The command that will be processed via JS
params Any set of data which will be processed via JS


© «Bitrix24», 2001-2022
Up