mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Merge pull request #378 from matrix-org/dbkr/fix_new-direct_chat
Fix 'start new direct chat'
This commit is contained in:
commit
3fc4e92a78
1 changed files with 2 additions and 2 deletions
|
@ -394,11 +394,11 @@ module.exports = React.createClass({
|
|||
|
||||
// TODO: keep existingOneToOneRoomId updated if we see any room member changes anywhere
|
||||
|
||||
var useExistingOneToOneRoom = this.state.existingOneToOneRoomId && (this.state.existingOneToOneRoomId !== this.props.member.roomId);
|
||||
const useExistingOneToOneRoom = this.state.existingOneToOneRoomId && (this.state.existingOneToOneRoomId !== this.props.member.roomId);
|
||||
|
||||
// check if there are any existing rooms with just us and them (1:1)
|
||||
// If so, just view that room. If not, create a private room with them.
|
||||
if (this.state.existingOneToOneRoomId) {
|
||||
if (useExistingOneToOneRoom) {
|
||||
dis.dispatch({
|
||||
action: 'view_room',
|
||||
room_id: this.state.existingOneToOneRoomId,
|
||||
|
|
Loading…
Reference in a new issue