don't create a room when rejecting an invite
This commit is contained in:
parent
f2d7f5e4da
commit
47b2eb0bdb
1 changed files with 6 additions and 3 deletions
|
@ -348,7 +348,8 @@ export class Sync {
|
||||||
}
|
}
|
||||||
let isNewRoom = false;
|
let isNewRoom = false;
|
||||||
let room = this._session.rooms.get(roomId);
|
let room = this._session.rooms.get(roomId);
|
||||||
if (!room) {
|
// don't create a room for a rejected invite
|
||||||
|
if (!room && membership === "join") {
|
||||||
room = this._session.createRoom(roomId);
|
room = this._session.createRoom(roomId);
|
||||||
isNewRoom = true;
|
isNewRoom = true;
|
||||||
}
|
}
|
||||||
|
@ -358,8 +359,10 @@ export class Sync {
|
||||||
if (invite) {
|
if (invite) {
|
||||||
inviteStates.push(new InviteSyncProcessState(invite, false, null, membership, null));
|
inviteStates.push(new InviteSyncProcessState(invite, false, null, membership, null));
|
||||||
}
|
}
|
||||||
roomStates.push(new RoomSyncProcessState(
|
if (room) {
|
||||||
room, isNewRoom, invite, roomResponse, membership));
|
roomStates.push(new RoomSyncProcessState(
|
||||||
|
room, isNewRoom, invite, roomResponse, membership));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue