Fix 'start new direct chat'
This commit is contained in:
parent
f393811171
commit
05f0d4d166
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
|
// 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)
|
// 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 so, just view that room. If not, create a private room with them.
|
||||||
if (this.state.existingOneToOneRoomId) {
|
if (useExistingOneToOneRoom) {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'view_room',
|
action: 'view_room',
|
||||||
room_id: this.state.existingOneToOneRoomId,
|
room_id: this.state.existingOneToOneRoomId,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue