Skip to content

Commit

Permalink
popupContext ws subscription is added. (TUM-Dev#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
barisgul15 committed Dec 12, 2023
1 parent 70bc1f3 commit b34e286
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/ts/components/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit b34e286

Please sign in to comment.