Gateway v6 support

This commit is contained in:
abalabahaha
2016-09-18 09:26:29 +09:00
parent d96f5d1e30
commit 34323c869e
10 changed files with 113 additions and 44 deletions

View File

@@ -802,13 +802,13 @@ var Client = (function (_EventEmitter) {
// def createChannel
Client.prototype.createChannel = function createChannel(server, name) {
var type = arguments.length <= 2 || arguments[2] === undefined ? "text" : arguments[2];
var type = arguments.length <= 2 || arguments[2] === undefined ? 0 : arguments[2];
var callback = arguments.length <= 3 || arguments[3] === undefined ? function () /*err, channel*/{} : arguments[3];
if (typeof type === "function") {
// options is the callback
callback = type;
type = "text";
type = 0;
}
return this.internal.createChannel(server, name, type).then(dataCallback(callback), errorCallback(callback));