diff --git a/plugins/love-resources/src/utils.ts b/plugins/love-resources/src/utils.ts index 3c40a21c47..6d2f7eed3d 100644 --- a/plugins/love-resources/src/utils.ts +++ b/plugins/love-resources/src/utils.ts @@ -3,7 +3,7 @@ import { connectMeeting, disconnectMeeting } from '@hcengineering/ai-bot-resourc import { Analytics } from '@hcengineering/analytics' import calendar, { type Event, getAllEvents } from '@hcengineering/calendar' import chunter from '@hcengineering/chunter' -import contact, { getCurrentEmployee, getName, type Person } from '@hcengineering/contact' +import contact, { type Employee, getCurrentEmployee, getName, type Person } from '@hcengineering/contact' import { personByIdStore } from '@hcengineering/contact-resources' import core, { AccountRole, @@ -869,7 +869,9 @@ export async function tryConnect ( for (const invite of currentInvites) { await client.update(invite, { status: invite.room === room._id ? RequestStatus.Approved : RequestStatus.Rejected }) } - if (room.access === RoomAccess.Knock && (!isOffice(room) || room.person !== currentPerson._id)) { + + const isGuest = (currentPerson as Employee).role === AccountRole.Guest + if ((room.access === RoomAccess.Knock || isGuest) && (!isOffice(room) || room.person !== currentPerson._id)) { const _id = await client.createDoc(love.class.JoinRequest, core.space.Workspace, { person: currentPerson._id, room: room._id,