ability to send file via sendMessage

This commit is contained in:
abalabahaha
2016-04-15 20:10:30 -07:00
parent 5f1e1b989b
commit dd71bb9e27
4 changed files with 106 additions and 26 deletions

View File

@@ -251,6 +251,11 @@ var Client = (function (_EventEmitter) {
callback = options;
options = {};
}
if (typeof content === "object" && content.file) {
// content has file
options = content;
content = "";
}
return this.internal.sendMessage(destination, content, options).then(dataCallback(callback), errorCallback(callback));
};