Skip to content

Commit

Permalink
for-testing
Browse files Browse the repository at this point in the history
Firefox with websocket
Other without
  • Loading branch information
AntoLC committed Feb 14, 2025
1 parent 09bea4f commit c64f1f2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- 'main'
- 'feature/collab-long-polling'
tags:
- 'v*'
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ services:
- env.d/development/common
ports:
- "4444:4444"
volumes:
- ./src/frontend/servers/y-provider:/home/frontend/servers/y-provider

kc_postgresql:
image: postgres:14.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { MessageEvent } from 'ws';
import * as Y from 'yjs';

import { isAPIError } from '@/api';
import { isFirefox } from '@/utils';

import {
pollOutgoingMessageRequest,
Expand Down Expand Up @@ -49,9 +50,12 @@ export class CollaborationProvider extends HocuspocusProvider {
protected url = '';

public constructor(configuration: CollaborationProviderConfiguration) {
const withWS = isFirefox();

let url = '';
if (isHocuspocusProviderConfigurationUrl(configuration)) {
url = configuration.url;
configuration.url = !withWS ? 'ws://localhost:6666' : configuration.url;
}

super(configuration);
Expand Down

0 comments on commit c64f1f2

Please sign in to comment.