Skip to content

Commit 33292ff

Browse files
committed
fix(chat-relay): mark experimental flag completed
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent e47c4c2 commit 33292ff

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

docs/settings.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,4 @@ Features that can be toggled on-off with the `experiments_users` and `experiment
144144
|-----|-----------|----------------------------------|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------|
145145
| 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 |
146146
| 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 |
147+
| 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 |

lib/Signaling/Manager.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,9 @@ public function getSignalingServerMissingFeatures(IResponse $response): array {
188188
$optionFeatures = [
189189
'dialout',
190190
'join-features',
191+
'chat-relay',
191192
];
192193

193-
if ($this->talkConfig->hasExperiment(Config::EXPERIMENTAL_CHAT_RELAY)) {
194-
$optionFeatures[] = 'chat-relay';
195-
}
196-
197194
return array_values(array_diff($optionFeatures, $features));
198195
}
199196

src/composables/useGetMessages.ts

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import { subscribe, unsubscribe } from '@nextcloud/event-bus'
2020
import { computed, inject, onBeforeUnmount, provide, ref, watch } from 'vue'
2121
import { START_LOCATION, useRoute } from 'vue-router'
2222
import { useStore } from 'vuex'
23-
import { CHAT, CONFIG, MESSAGE } from '../constants.ts'
24-
import { getTalkConfig } from '../services/CapabilitiesManager.ts'
23+
import { CHAT, MESSAGE } from '../constants.ts'
2524
import { EventBus } from '../services/EventBus.ts'
2625
import { useChatStore } from '../stores/chat.ts'
2726
import { useChatExtrasStore } from '../stores/chatExtras.ts'
@@ -42,8 +41,6 @@ type GetMessagesContext = {
4241
}
4342

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

4845
/**
4946
* Check whether caught error is from OCS API
@@ -167,11 +164,9 @@ export function useGetMessagesProvider() {
167164
subscribe('networkOnline', handleNetworkOnline)
168165
EventBus.on('route-change', onRouteChange)
169166
EventBus.on('set-context-id-to-bottom', setContextIdToBottom)
170-
if (experimentalChatRelay) {
171-
EventBus.on('signaling-message-received', addMessageFromChatRelay)
172-
EventBus.on('signaling-supported-features', checkChatRelaySupport)
173-
EventBus.on('should-refresh-chat-messages', tryPollNewMessages)
174-
}
167+
EventBus.on('signaling-message-received', addMessageFromChatRelay)
168+
EventBus.on('signaling-supported-features', checkChatRelaySupport)
169+
EventBus.on('should-refresh-chat-messages', tryPollNewMessages)
175170

176171
/** Every 30 seconds we remove expired messages from the store */
177172
expirationInterval = setInterval(() => {
@@ -351,9 +346,7 @@ export function useGetMessagesProvider() {
351346

352347
isInitialisingMessages.value = false
353348

354-
if (!experimentalChatRelay) {
355-
pollNewMessages(token)
356-
} else if (chatRelaySupported !== null) {
349+
if (chatRelaySupported !== null) {
357350
// Case: chat relay is confirmed to be supported / not supported from signaling hello message,
358351
// but polling was not immediately triggered (e.g, when received while context request is ongoing)
359352
pollNewMessages(token)

0 commit comments

Comments
 (0)