Skip to content
Draft
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
2 changes: 1 addition & 1 deletion docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ Features that can be toggled on-off with the `experiments_users` and `experiment
|-----|-----------|----------------------------------|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| 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 |
| 4 | Active | Web 22.0.3<br>Desktop 2.0.4 | - | Send chat messages via the High performance-backend / websocket |
| 4 | Completed | Web 22.0.3<br>Desktop 2.0.4 | Web 23.0.0<br>Desktop 2.x.x | Send chat messages via the High performance-backend / websocket |
5 changes: 1 addition & 4 deletions lib/Signaling/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,9 @@ public function getSignalingServerMissingFeatures(IResponse $response): array {
$optionFeatures = [
'dialout',
'join-features',
'chat-relay',
];

if ($this->talkConfig->hasExperiment(Config::EXPERIMENTAL_CHAT_RELAY)) {
$optionFeatures[] = 'chat-relay';
}

return array_values(array_diff($optionFeatures, $features));
}

Expand Down
17 changes: 5 additions & 12 deletions src/composables/useGetMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import { t } from '@nextcloud/l10n'
import { computed, inject, onBeforeUnmount, provide, ref, watch } from 'vue'
import { START_LOCATION, useRoute } from 'vue-router'
import { useStore } from 'vuex'
import { CHAT, CONFIG, MESSAGE } from '../constants.ts'
import { getTalkConfig } from '../services/CapabilitiesManager.ts'
import { CHAT, MESSAGE } from '../constants.ts'
import { EventBus } from '../services/EventBus.ts'
import { useChatStore } from '../stores/chat.ts'
import { useChatExtrasStore } from '../stores/chatExtras.ts'
Expand All @@ -43,8 +42,6 @@ type GetMessagesContext = {
}

const GET_MESSAGES_CONTEXT_KEY: InjectionKey<GetMessagesContext> = Symbol.for('GET_MESSAGES_CONTEXT')
// TOREMOVE in main branch
const experimentalChatRelay = (getTalkConfig('local', 'experiments', 'enabled') ?? 0) & CONFIG.EXPERIMENTAL.CHAT_RELAY

/**
* Check whether caught error is from OCS API
Expand Down Expand Up @@ -168,11 +165,9 @@ export function useGetMessagesProvider() {
subscribe('networkOnline', handleNetworkOnline)
EventBus.on('route-change', onRouteChange)
EventBus.on('set-context-id-to-bottom', setContextIdToBottom)
if (experimentalChatRelay) {
EventBus.on('signaling-message-received', addMessageFromChatRelay)
EventBus.on('signaling-supported-features', checkChatRelaySupport)
EventBus.on('should-refresh-chat-messages', tryPollNewMessages)
}
EventBus.on('signaling-message-received', addMessageFromChatRelay)
EventBus.on('signaling-supported-features', checkChatRelaySupport)
EventBus.on('should-refresh-chat-messages', tryPollNewMessages)

/** Every 30 seconds we remove expired messages from the store */
expirationInterval = setInterval(() => {
Expand Down Expand Up @@ -352,9 +347,7 @@ export function useGetMessagesProvider() {

isInitialisingMessages.value = false

if (!experimentalChatRelay) {
pollNewMessages(token)
} else if (chatRelaySupported !== null) {
if (chatRelaySupported !== null) {
// Case: chat relay is confirmed to be supported / not supported from signaling hello message,
// but polling was not immediately triggered (e.g, when received while context request is ongoing)
pollNewMessages(token)
Expand Down
Loading