From b34e286d7f376da97a89d5f329f17c21b290005a Mon Sep 17 00:00:00 2001 From: barisgul15 <70471039+barisgul15@users.noreply.github.com> Date: Tue, 12 Dec 2023 10:18:51 +0100 Subject: [PATCH] popupContext ws subscription is added. (#1253) --- web/ts/components/popup.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/ts/components/popup.ts b/web/ts/components/popup.ts index d423a50d0..568f18a89 100644 --- a/web/ts/components/popup.ts +++ b/web/ts/components/popup.ts @@ -5,7 +5,11 @@ import { SocketConnections } from "../api/chat-ws"; export function popupContext(streamId: number): AlpineComponent { return { init() { + // subscription? SocketConnections.ws = new RealtimeFacade("chat/" + streamId); + // ws needs to subscribe, so that pop-out chat can work + const handler = (data) => {}; + SocketConnections.ws.subscribe(handler); }, } as AlpineComponent; }