From 3ecd6576bbaaecc31f1e5743238890f3e69edd87 Mon Sep 17 00:00:00 2001 From: Jim McGaw Date: Sun, 26 Feb 2023 13:55:39 -0500 Subject: [PATCH] restores the 'new room created' conditional part of initial alert --- src/store/epics/chatEpics.js | 3 ++- src/store/epics/helpers/ChatHandler.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/store/epics/chatEpics.js b/src/store/epics/chatEpics.js index 23b948a..72173e4 100644 --- a/src/store/epics/chatEpics.js +++ b/src/store/epics/chatEpics.js @@ -71,7 +71,8 @@ const initChatHandlerConnection = ({ authToken, secretKey, mID, isNewRoom }) => return chatHandler.initConnection({ authToken, secretKey: secretKey, - mID + mID, + isNewRoom, }); }; diff --git a/src/store/epics/helpers/ChatHandler.js b/src/store/epics/helpers/ChatHandler.js index 68ca6ff..712e9d5 100644 --- a/src/store/epics/helpers/ChatHandler.js +++ b/src/store/epics/helpers/ChatHandler.js @@ -181,7 +181,7 @@ class ChatHandler { reader.readAsArrayBuffer(fileBlob); }; - initConnection = ({ mID, secretKey, authToken }) => { + initConnection = ({ mID, secretKey, authToken, isNewRoom }) => { this.mID = mID; this.secretKey = secretKey; this.authToken = authToken; @@ -195,7 +195,7 @@ class ChatHandler { this.ws.onmessage = this.onWsMessage; this.ws.onopen = (event) => { event.target.send(this.authToken); - observer.next(); + observer.next(isNewRoom); observer.complete(); };