Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ Legend:

Features that can be toggled on-off with the `experiments_users` and `experiments_guests` bit flags:

| Bit | Status | Introduced | Ended | Description |
|-----|--------|----------------------------------|-------|-----------------------------------------------------------------------------------------------------------------------------|
| 1 | Active | Web 21.1.0<br>Desktop 1.2.2-beta | - | Instead of refreshing the participant list repeatingly during calls, the data is generated from received signaling messages |
| 2 | Active | Web 21.1.0<br>Desktop 1.2.2 | - | Make automatic attempts to recover suspended / expired signaling session to allow join the call without page reload |
| Bit | Status | Introduced | Ended | Description |
|-----|-----------|----------------------------------|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| 1 | Completed | Web 21.1.0<br>Desktop 1.2.2-beta | Web 23.0.0<br>Desktop 2.x.x | Instead of refreshing the participant list repeatingly during calls, the data is generated from received signaling messages |
| 2 | Completed | Web 21.1.0<br>Desktop 1.2.2 | Web 23.0.0<br>Desktop 2.x.x | Make automatic attempts to recover suspended / expired signaling session to allow join the call without page reload |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make automatic attempts to recover suspended / expired signaling session to allow join

But this is still a problem, isn't it?

Copy link
Contributor Author

@Antreesy Antreesy Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember recent reports regarding this, apart from community, who doesn't have a flag enabled

As alternative, we can keep this flag 'active', but merge changes in src/composables/useActiveSession.js, as they prove to solve some part of the issue

| 4 | Active | Web 22.0.3<br>Desktop 2.0.4 | - | Send chat messages via the High performance-backend / websocket |
10 changes: 4 additions & 6 deletions src/composables/useActiveSession.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import { computed, onBeforeMount, onBeforeUnmount, ref, watch } from 'vue'
import { useStore } from 'vuex'
import { CONFIG, SESSION } from '../constants.ts'
import { getTalkConfig, hasTalkFeature } from '../services/CapabilitiesManager.ts'
import { SESSION } from '../constants.ts'
import { hasTalkFeature } from '../services/CapabilitiesManager.ts'
import { setSessionState } from '../services/participantsService.js'
import { useTokenStore } from '../stores/token.ts'
import { useDocumentVisibility } from './useDocumentVisibility.ts'
Expand All @@ -15,8 +15,6 @@ import { useIsInCall } from './useIsInCall.js'

const INACTIVE_TIME_MS = 3 * 60 * 1000

const experimentalRecoverSession = (getTalkConfig('local', 'experiments', 'enabled') ?? 0) & CONFIG.EXPERIMENTAL.RECOVER_SESSION

/**
* Check whether the current session is active or not:
* - tab or browser window was moved to background or minimized
Expand Down Expand Up @@ -80,7 +78,7 @@ export function useActiveSession() {
console.info('Session has been marked as active')
} catch (error) {
console.error(error)
if (experimentalRecoverSession && error?.response?.status === 404) {
if (error?.response?.status === 404) {
// In case of 404 - participant did not have a session, block UI to join call
tokenStore.updateLastJoinedConversationToken('')
// Automatically try to join the conversation again
Expand All @@ -106,7 +104,7 @@ export function useActiveSession() {
console.info('Session has been marked as inactive')
} catch (error) {
console.error(error)
if (experimentalRecoverSession && error?.response?.status === 404) {
if (error?.response?.status === 404) {
// In case of 404 - participant did not have a session, block UI to join call
tokenStore.updateLastJoinedConversationToken('')
// Automatically try to join the conversation again
Expand Down
32 changes: 9 additions & 23 deletions src/composables/useGetParticipants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ import type {
import { createSharedComposable } from '@vueuse/core'
import { computed, nextTick, onBeforeUnmount, ref, watch } from 'vue'
import { useStore } from 'vuex'
import { CONFIG, CONVERSATION } from '../constants.ts'
import { getTalkConfig } from '../services/CapabilitiesManager.ts'
import { CONVERSATION } from '../constants.ts'
import { EventBus } from '../services/EventBus.ts'
import { useActorStore } from '../stores/actor.ts'
import { useSessionStore } from '../stores/session.ts'
import { useDocumentVisibility } from './useDocumentVisibility.ts'
import { useGetToken } from './useGetToken.ts'
import { useIsInCall } from './useIsInCall.js'

const experimentalUpdateParticipants = (getTalkConfig('local', 'experiments', 'enabled') ?? 0) & CONFIG.EXPERIMENTAL.UPDATE_PARTICIPANTS

let fetchingParticipants = false
let pendingChanges = true
let throttleFastUpdateTimeout: NodeJS.Timeout | undefined
Expand Down Expand Up @@ -57,19 +54,12 @@ function useGetParticipantsComposable(activeTab = ref('participants')) {
*/
function initialiseGetParticipants() {
EventBus.on('joined-conversation', onJoinedConversation)
if (experimentalUpdateParticipants) {
EventBus.on('signaling-users-in-room', handleUsersUpdated)
EventBus.on('signaling-users-joined', handleUsersUpdated)
EventBus.on('signaling-users-changed', handleUsersUpdated)
EventBus.on('signaling-users-left', handleUsersLeft)
EventBus.on('signaling-all-users-changed-in-call-to-disconnected', handleUsersDisconnected)
EventBus.on('signaling-participant-list-updated', throttleUpdateParticipants)
} else {
// FIXME this works only temporary until signaling is fixed to be only on the calls
// Then we have to search for another solution. Maybe the room list which we update
// periodically gets a hash of all online sessions?
EventBus.on('signaling-participant-list-changed', throttleUpdateParticipants)
}
EventBus.on('signaling-users-in-room', handleUsersUpdated)
EventBus.on('signaling-users-joined', handleUsersUpdated)
EventBus.on('signaling-users-changed', handleUsersUpdated)
EventBus.on('signaling-users-left', handleUsersLeft)
EventBus.on('signaling-all-users-changed-in-call-to-disconnected', handleUsersDisconnected)
EventBus.on('signaling-participant-list-updated', throttleUpdateParticipants)
EventBus.on('signaling-users-changed', checkCurrentUserPermissions)
}

Expand All @@ -94,7 +84,7 @@ function useGetParticipantsComposable(activeTab = ref('participants')) {
* @param payload."0" - users list
*/
async function checkCurrentUserPermissions([users]: [StandaloneSignalingUpdateSession[]]) {
// TODO: move logic to sessionStore once experimental flag is dropped
// TODO: move logic to sessionStore
const currentUser = users.find((user) => {
return user.userId ? user.userId === actorStore.userId : user.actorId === actorStore.actorId
})
Expand Down Expand Up @@ -151,11 +141,7 @@ function useGetParticipantsComposable(activeTab = ref('participants')) {
* Trigger participants list update upon joining
*/
async function onJoinedConversation() {
if (isOneToOneConversation.value || experimentalUpdateParticipants) {
cancelableGetParticipants()
} else {
nextTick(() => throttleUpdateParticipants())
}
cancelableGetParticipants()
}

/**
Expand Down