Fix office join (#6650)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-09-20 14:06:49 +05:00 committed by GitHub
parent a0f3be9dbd
commit 2a9e9918ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,13 +31,13 @@
const client = getClient()
async function accept (): Promise<void> {
await client.update(request, { status: RequestStatus.Approved })
if (request.room === $myOffice?._id && !$isConnected) {
const me = (getCurrentAccount() as PersonAccount).person
const person = $personByIdStore.get(me)
if (person === undefined) return
await connectRoom(0, 0, $myInfo, person, $myOffice)
}
await client.update(request, { status: RequestStatus.Approved })
}
async function decline (): Promise<void> {