mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
don't create a room when rejecting an invite
This commit is contained in:
parent
f2d7f5e4da
commit
47b2eb0bdb
@ -348,7 +348,8 @@ export class Sync {
|
||||
}
|
||||
let isNewRoom = false;
|
||||
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);
|
||||
isNewRoom = true;
|
||||
}
|
||||
@ -358,12 +359,14 @@ export class Sync {
|
||||
if (invite) {
|
||||
inviteStates.push(new InviteSyncProcessState(invite, false, null, membership, null));
|
||||
}
|
||||
if (room) {
|
||||
roomStates.push(new RoomSyncProcessState(
|
||||
room, isNewRoom, invite, roomResponse, membership));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return roomStates;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user