mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
Fix presence exception. Yay, javascript.
This commit is contained in:
parent
95cdbe3a48
commit
0df0935b9c
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue