Skip to content

Commit 241bb65

Browse files
committed
Merge pull request #4 from Dragory/master
Fix session name not saving locally on bot.create
2 parents 21997d0 + 724f379 commit 241bb65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ var cio = function (user, key) {
1414
}}, function (err, httpResponse, body) {
1515
if (err) throw err;
1616
if (JSON.parse(body).status == "success") {
17-
this.nick = JSON.parse(body).nick;
18-
callback(false, this.nick);
17+
this.setNick(JSON.parse(body).nick);
18+
callback(false, this.nick);
1919
}
2020
else if (JSON.parse(body).status == "Error: reference name already exists") {
21-
callback(false, this.nick);
21+
callback(false, this.nick);
2222
}
2323
else {
2424
throw JSON.parse(body).status;
2525
}
26-
});
26+
}.bind(this));
2727
}
2828

2929
this.ask = function (input, callback) {

0 commit comments

Comments
 (0)