From b151956f7b15f9ab7e252155f88b9f11d90518be Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 2 Aug 2018 11:42:19 +0200 Subject: [PATCH] Use room method to help with DM detection with fallback to summary heroes/counts. --- src/components/structures/RoomView.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 5135936a28..08bed976cc 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -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); } },