index.js
function( userId ) {
		return this.memory.getPublicRoom()
		.then(function( roomId ) {
			if ( roomId ) {
				return this.enter( userId, roomId);
			} else {
				return promise.reject( 'Could not find a public room' );
			}
		}.bind(this));
	}
function( userId ) {
		return this.memory.getPublicRoom()
		.then(function( roomId ) {
			if ( roomId ) {
				return this.enter( userId, roomId);
			} else {
				return promise.reject( 'Could not find a public room' );
			}
		}.bind(this));
	}
function ( userId ) { return this . memory . getPublicRoom ( ) . then ( function ( roomId ) { if ( roomId ) { return this . enter ( userId , roomId ) ; } else { return promise . reject ( 'Could not find a public room' ) ; } } . bind ( this ) ) ; }
Join an available public room or create one

@param  {String} userId id of the user whose entering a room
@return {Promise} This promise will resolve by sending a room instance, or reject if no public rooms available
Join an available public room or create one