You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-21 07:42:09 +03:00
Use room method to help with DM detection with fallback to summary heroes/counts.
This commit is contained in:
@ -758,16 +758,13 @@ module.exports = React.createClass({
|
||||
},
|
||||
|
||||
_updateDMState() {
|
||||
const me = this.state.room.getMember(MatrixClientPeg.get().getUserId());
|
||||
const room = this.state.room;
|
||||
if (room.getMyMembership() != "join") {
|
||||
return;
|
||||
}
|
||||
const roomId = this.state.room.roomId;
|
||||
const dmInviter = me.getDMInviter();
|
||||
|
||||
const dmInviter = room.getDMInviter();
|
||||
if (dmInviter) {
|
||||
Rooms.setDMRoom(roomId, dmInviter);
|
||||
Rooms.setDMRoom(room.roomId, dmInviter);
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user