Fix presence exception. Yay, javascript.

This commit is contained in:
David Baker 2015-11-18 09:57:14 +00:00
parent 95cdbe3a48
commit 0df0935b9c

View File

@ -73,11 +73,12 @@ class Presence {
}
var old_state = this.state;
this.state = newState;
var self = this;
MatrixClientPeg.get().setPresence(this.state).done(function() {
console.log("Presence: %s", newState);
}, function(err) {
console.error("Failed to set presence: %s", err);
this.state = old_state;
self.state = old_state;
});
}