You are here

function nodejs_set_user_presence_list in Node.js integration 7

Same name and namespace in other branches
  1. 8 nodejs.module \nodejs_set_user_presence_list()
  2. 6 nodejs.module \nodejs_set_user_presence_list()

Set the list of uids a user can see presence notifications for.

s

Parameters

$uid:

File

./nodejs.module, line 152

Code

function nodejs_set_user_presence_list($uid, array $uids) {

  // Http request went ok. Process Node.js server response.
  if ($node_response = Nodejs::setUserPresenceList($uid, $uids)) {
    if ($node_response->status == 'success') {
      return TRUE;
    }
    else {
      watchdog('nodejs', 'Error setting user presence list for uid "%uid" on the Node.js server. Server response: %error', array(
        '%uid' => $uid,
        '%error' => $node_response->error,
      ));
      return FALSE;
    }
  }
  else {
    return FALSE;
  }
}