14 lines
468 B
TypeScript
14 lines
468 B
TypeScript
import { iframeListener } from "../Api/IframeListener";
|
|
import { chatMessagesStore, chatVisibilityStore } from "../Stores/ChatStore";
|
|
|
|
export class DiscussionManager {
|
|
constructor() {
|
|
iframeListener.chatStream.subscribe((chatEvent) => {
|
|
chatMessagesStore.addExternalMessage(parseInt(chatEvent.author), chatEvent.message);
|
|
chatVisibilityStore.set(true);
|
|
});
|
|
}
|
|
}
|
|
|
|
export const discussionManager = new DiscussionManager();
|