partey_workadventure/front/src/WebRtc/DiscussionManager.ts

14 lines
468 B
TypeScript
Raw Normal View History

import { iframeListener } from "../Api/IframeListener";
import { chatMessagesStore, chatVisibilityStore } from "../Stores/ChatStore";
2020-10-25 21:59:14 +01:00
export class DiscussionManager {
constructor() {
iframeListener.chatStream.subscribe((chatEvent) => {
chatMessagesStore.addExternalMessage(parseInt(chatEvent.author), chatEvent.message);
chatVisibilityStore.set(true);
2020-10-25 21:59:14 +01:00
});
}
}
2021-01-21 10:16:08 +01:00
export const discussionManager = new DiscussionManager();