lib/common/service/channelService.js
function(uid, sid, groups) {
  if(!sid) {
    logger.warn('ignore uid %j for sid not specified.', uid);
    return false;
  }

  var group = groups[sid];
  if(!group) {
    group = [];
    groups[sid] = group;
  }

  group.push(uid);
  return true;
}
function(uid, sid, groups) {
  if(!sid) {
    logger.warn('ignore uid %j for sid not specified.', uid);
    return false;
  }

  var group = groups[sid];
  if(!group) {
    group = [];
    groups[sid] = group;
  }

  group.push(uid);
  return true;
}
function ( uid , sid , groups ) { if ( ! sid ) { logger . warn ( 'ignore uid %j for sid not specified.' , uid ) ; return false ; } var group = groups [ sid ] ; if ( ! group ) { group = [ ] ; groups [ sid ] = group ; } group . push ( uid ) ; return true ; }
add uid and sid into group. ignore any uid that uid not specified.

@param uid user id
@param sid server id
@param groups {Object} grouped uids, , key: sid, value: [uid]
add uid and sid into group . ignore any uid that uid not specified .