|
|
@@ -260,6 +260,14 @@ SlackData.prototype.updateStatic = function(data, t) {
|
|
|
botObj = this.users[this.team.id +'|' +data["bots"][i]["id"]] = new SlackBot(this.team.id +'|', data["bots"][i]["id"]);
|
|
|
botObj.update(data["bots"][i], t);
|
|
|
}
|
|
|
+ if (data.commands) {
|
|
|
+ var aliasCmd = {};
|
|
|
+ for (let i in data.commands)
|
|
|
+ if (data.commands[i].canonical_name)
|
|
|
+ aliasCmd[data.commands[i].canonical_name] = Object.create(Object.prototype, data.commands[i]);
|
|
|
+ for (let i in aliasCmd)
|
|
|
+ data.commands[i] = aliasCmd[i];
|
|
|
+ }
|
|
|
ChatContext.prototype.updateStatic.call(this, data, t, this.team.id +'|');
|
|
|
if (data["ims"]) for (var i =0, nbIms = data["ims"].length; i < nbIms; i++) {
|
|
|
var user = this.users[this.team.id +'|' +data["ims"][i]["user"]];
|