mirror of https://github.com/vector-im/riot-web
Use room method to help with DM detection with fallback to summary heroes/counts.
parent
908de56c6d
commit
b151956f7b
|
@ -758,16 +758,13 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateDMState() {
|
_updateDMState() {
|
||||||
const me = this.state.room.getMember(MatrixClientPeg.get().getUserId());
|
|
||||||
const room = this.state.room;
|
const room = this.state.room;
|
||||||
if (room.getMyMembership() != "join") {
|
if (room.getMyMembership() != "join") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const roomId = this.state.room.roomId;
|
const dmInviter = room.getDMInviter();
|
||||||
const dmInviter = me.getDMInviter();
|
|
||||||
|
|
||||||
if (dmInviter) {
|
if (dmInviter) {
|
||||||
Rooms.setDMRoom(roomId, dmInviter);
|
Rooms.setDMRoom(room.roomId, dmInviter);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue