mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Fix presence exception. Yay, javascript.
This commit is contained in:
parent
95cdbe3a48
commit
0df0935b9c
@ -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 New Issue
Block a user