You are here

function nodejs_actions_enqueue_message in Node.js integration 6

Same name and namespace in other branches
  1. 7 nodejs_actions/nodejs_actions.module \nodejs_actions_enqueue_message()

Helper function for enqueueing 'nodejs_notify' channel messages.

Parameters

mixed $subject:

mixed $body:

23 calls to nodejs_actions_enqueue_message()
realtime_comment_action in nodejs_actions/nodejs_actions.module
Callback to handle comment notifications.
realtime_node_notification in nodejs_actions/nodejs_actions.module
Callback to handle node notifications.
realtime_og_user_admin_new_action in nodejs_actions/nodejs_actions.module
Callback to handle nodejs notification when a user requests membership to a group.
realtime_og_user_approve_action in nodejs_actions/nodejs_actions.module
Callback to handle nodejs notification when a user has been approved for membership to a group.
realtime_og_user_delete_action in nodejs_actions/nodejs_actions.module
Callback to handle nodejs notification when a user leave a group.

... See full list

File

nodejs_actions/nodejs_actions.module, line 467

Code

function nodejs_actions_enqueue_message($subject, $body) {
  $message = (object) array(
    'broadcast' => TRUE,
    'data' => (object) array(
      'subject' => $subject,
      'body' => $body,
    ),
    'channel' => 'nodejs_notify',
  );
  nodejs_enqueue_message($message);
}