You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-19 16:42:09 +03:00
Fire presence first time if presence event unset.
This commit is contained in:
@@ -45,10 +45,11 @@ User.prototype.setPresenceEvent = function(event) {
|
||||
if (event.getType() !== "m.presence") {
|
||||
return;
|
||||
}
|
||||
var firstFire = this.events.presence === null;
|
||||
this.events.presence = event;
|
||||
|
||||
var eventsToFire = [];
|
||||
if (event.getContent().presence !== this.presence) {
|
||||
if (event.getContent().presence !== this.presence || firstFire) {
|
||||
eventsToFire.push("User.presence");
|
||||
}
|
||||
if (event.getContent().avatar_url !== this.avatarUrl) {
|
||||
|
Reference in New Issue
Block a user