mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-28 19:08:01 +00:00
UBERF-9462 Restore room access (#7971)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
d24e9a1eb4
commit
6f790a52c5
@ -221,7 +221,7 @@ async function setDefaultRoomAccess (info: ParticipantInfo, control: TriggerCont
|
||||
const roomInfos = await control.queryFind(control.ctx, love.class.RoomInfo, {})
|
||||
const oldRoomInfo = roomInfos.find((ri) => ri.persons.includes(info.person))
|
||||
if (oldRoomInfo !== undefined) {
|
||||
if (oldRoomInfo.persons.length === 0) {
|
||||
if (oldRoomInfo.persons.length === 1 && oldRoomInfo.persons[0] === info.person) {
|
||||
res.push(control.txFactory.createTxRemoveDoc(oldRoomInfo._class, oldRoomInfo.space, oldRoomInfo._id))
|
||||
|
||||
const resetAccessTx = control.txFactory.createTxUpdateDoc(
|
||||
|
Loading…
Reference in New Issue
Block a user