Fix office join (#6650)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2024-09-20 16:06:49 +07:00
committed by GitHub
parent a0f3be9dbd
commit 2a9e9918ac
@@ -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> {