Skip to content

Commit c64f1f2

Browse files
committed
for-testing
Firefox with websocket Other without
1 parent 09bea4f commit c64f1f2

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.github/workflows/docker-hub.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
push:
77
branches:
88
- 'main'
9+
- 'feature/collab-long-polling'
910
tags:
1011
- 'v*'
1112
pull_request:

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ services:
166166
- env.d/development/common
167167
ports:
168168
- "4444:4444"
169+
volumes:
170+
- ./src/frontend/servers/y-provider:/home/frontend/servers/y-provider
169171

170172
kc_postgresql:
171173
image: postgres:14.3

src/frontend/apps/impress/src/features/docs/doc-management/libs/CollaborationProvider.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import type { MessageEvent } from 'ws';
1313
import * as Y from 'yjs';
1414

1515
import { isAPIError } from '@/api';
16+
import { isFirefox } from '@/utils';
1617

1718
import {
1819
pollOutgoingMessageRequest,
@@ -49,9 +50,12 @@ export class CollaborationProvider extends HocuspocusProvider {
4950
protected url = '';
5051

5152
public constructor(configuration: CollaborationProviderConfiguration) {
53+
const withWS = isFirefox();
54+
5255
let url = '';
5356
if (isHocuspocusProviderConfigurationUrl(configuration)) {
5457
url = configuration.url;
58+
configuration.url = !withWS ? 'ws://localhost:6666' : configuration.url;
5559
}
5660

5761
super(configuration);

0 commit comments

Comments
 (0)