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(); };