mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
Refresh the membership list on 3PID invites
This commit is contained in:
parent
4775f39e1d
commit
366a24bbe4
1 changed files with 8 additions and 0 deletions
|
@ -51,6 +51,7 @@ module.exports = React.createClass({
|
||||||
var cli = MatrixClientPeg.get();
|
var cli = MatrixClientPeg.get();
|
||||||
cli.on("RoomState.members", this.onRoomStateMember);
|
cli.on("RoomState.members", this.onRoomStateMember);
|
||||||
cli.on("RoomMember.name", this.onRoomMemberName);
|
cli.on("RoomMember.name", this.onRoomMemberName);
|
||||||
|
cli.on("RoomState.events", this.onRoomStateEvent);
|
||||||
cli.on("Room", this.onRoom); // invites
|
cli.on("Room", this.onRoom); // invites
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -60,6 +61,7 @@ module.exports = React.createClass({
|
||||||
MatrixClientPeg.get().removeListener("RoomState.members", this.onRoomStateMember);
|
MatrixClientPeg.get().removeListener("RoomState.members", this.onRoomStateMember);
|
||||||
MatrixClientPeg.get().removeListener("RoomMember.name", this.onRoomMemberName);
|
MatrixClientPeg.get().removeListener("RoomMember.name", this.onRoomMemberName);
|
||||||
MatrixClientPeg.get().removeListener("User.presence", this.userPresenceFn);
|
MatrixClientPeg.get().removeListener("User.presence", this.userPresenceFn);
|
||||||
|
MatrixClientPeg.get().removeListener("RoomState.events", this.onRoomStateEvent);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -133,6 +135,12 @@ module.exports = React.createClass({
|
||||||
this._updateList();
|
this._updateList();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onRoomStateEvent: function(event, state) {
|
||||||
|
if (event.getType() === "m.room.third_party_invite") {
|
||||||
|
this._updateList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
_updateList: function() {
|
_updateList: function() {
|
||||||
this.memberDict = this.getMemberDict();
|
this.memberDict = this.getMemberDict();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue