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
this code actually never fires, so remove it
and that's ok because createRoom will already mark a DM as such on the inviter's side. So here we just handle the invitees side.
This commit is contained in:
@ -758,22 +758,6 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
if (dmInviter) {
|
if (dmInviter) {
|
||||||
Rooms.setDMRoom(roomId, dmInviter);
|
Rooms.setDMRoom(roomId, dmInviter);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const invitedMembers = this.state.room.getMembersWithMembership("invite");
|
|
||||||
const joinedMembers = this.state.room.getMembersWithMembership("join");
|
|
||||||
|
|
||||||
// There must be one invited member and one joined member
|
|
||||||
if (invitedMembers.length !== 1 || joinedMembers.length !== 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The user may have sent an invite with is_direct sent
|
|
||||||
const other = invitedMembers[0];
|
|
||||||
if (other && !!other.getDirectChatInviter()) {
|
|
||||||
Rooms.setDMRoom(roomId, other.userId);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user