Merge branch 'staging' into develop

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2025-02-11 16:24:38 +07:00
commit 4f61a4d204
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2
2 changed files with 4 additions and 2 deletions

View File

@ -15,6 +15,7 @@
<script lang="ts">
import { getMetadata } from '@hcengineering/platform'
import uiPlugin, { closePopup, closeTooltip, navigate, parseLocation } from '@hcengineering/ui'
import presentation from '../plugin'
export let href: string | undefined
export let disabled = false
@ -44,7 +45,8 @@
closeTooltip()
try {
const url = new URL(href)
if (url.origin === window.location.origin) {
const frontUrl = getMetadata(presentation.metadata.FrontUrl) ?? window.location.origin
if (url.origin === frontUrl) {
const loc = parseLocation(url)
const routes = getMetadata(uiPlugin.metadata.Routes)
const app = routes?.get(loc.path[0])

View File

@ -219,7 +219,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(