Skip to content

Commit

Permalink
Fix check connect (#7227)
Browse files Browse the repository at this point in the history
Signed-off-by: Kristina Fefelova <[email protected]>
  • Loading branch information
kristina-fefelova authored Nov 24, 2024
1 parent 4c52a43 commit 7c9a898
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins/love-resources/src/components/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
import { onDestroy, onMount } from 'svelte'
import presentation from '@hcengineering/presentation'
import { personByIdStore } from '@hcengineering/contact-resources'
import { RoomType } from '@hcengineering/love'
import Hall from './Hall.svelte'
import { getMetadata } from '@hcengineering/platform'
import love from '../plugin'
import { tryConnect, isConnected, isCurrentInstanceConnected } from '../utils'
import { tryConnect, isConnected, isCurrentInstanceConnected, screenSharing } from '../utils'
import { infos, invites, myInfo, myRequests, storePromise, currentRoom } from '../stores'
const localNav: boolean = $deviceInfo.navigator.visible
Expand All @@ -48,7 +49,9 @@
if (
!$isConnected &&
!$isCurrentInstanceConnected &&
$myInfo?.sessionId === getMetadata(presentation.metadata.SessionId)
(room.type === RoomType.Video || $screenSharing) &&
$myInfo?.sessionId &&
$myInfo.sessionId === getMetadata(presentation.metadata.SessionId)
) {
const info = $infos.filter((p) => p.room === room._id)
await tryConnect($personByIdStore, $myInfo, room, info, $myRequests, $invites)
Expand Down

0 comments on commit 7c9a898

Please sign in to comment.