chore: Adjust Chatwoot Config to deploy frontend as a separate app (#2347)

This commit is contained in:
Pranav Raj S
2021-05-28 19:21:16 +05:30
committed by GitHub
parent 3b39eb3e33
commit 25ba852b68
16 changed files with 53 additions and 60 deletions

View File

@@ -3,8 +3,9 @@ import { createConsumer } from '@rails/actioncable';
const PRESENCE_INTERVAL = 60000;
class BaseActionCableConnector {
constructor(app, pubsubToken) {
this.consumer = createConsumer();
constructor(app, pubsubToken, websocketHost = '') {
const websocketURL = websocketHost ? `${websocketHost}/cable` : undefined;
this.consumer = createConsumer(websocketURL);
this.subscription = this.consumer.subscriptions.create(
{
channel: 'RoomChannel',