lib/session/channels.js
function(names, cb) {
      if (!cb) {
        cb = function() {};
      }
      if (!session.channels) {
        session.channels = [];
      }
      forceArray(names).forEach(function(name) {
        var i;
        if ((i = session.channels.indexOf(name)) >= 0) {
          session.channels.splice(i, 1);
          subscriptions.channel.remove(name, socketId);
          return ss.log.info('i'.green + ' unsubscribed sessionId '.grey + session.id + ' from channel '.grey + name);
        }
      });
      return session.save(cb);
    }
function(names, cb) {
      if (!cb) {
        cb = function() {};
      }
      if (!session.channels) {
        session.channels = [];
      }
      forceArray(names).forEach(function(name) {
        var i;
        if ((i = session.channels.indexOf(name)) >= 0) {
          session.channels.splice(i, 1);
          subscriptions.channel.remove(name, socketId);
          return ss.log.info('i'.green + ' unsubscribed sessionId '.grey + session.id + ' from channel '.grey + name);
        }
      });
      return session.save(cb);
    }
function ( names , cb ) { if ( ! cb ) { cb = function ( ) { } ; } if ( ! session . channels ) { session . channels = [ ] ; } forceArray ( names ) . forEach ( function ( name ) { var i ; if ( ( i = session . channels . indexOf ( name ) ) >= 0 ) { session . channels . splice ( i , 1 ) ; subscriptions . channel . remove ( name , socketId ) ; return ss . log . info ( 'i' . green + ' unsubscribed sessionId ' . grey + session . id + ' from channel ' . grey + name ) ; } } ) ; return session . save ( cb ) ; }
Unsubscribes the client from one or more channels
Unsubscribes the client from one or more channels