From b91d588f9ceb6f4462576a3517067dc9e56610f8 Mon Sep 17 00:00:00 2001 From: damencho Date: Mon, 20 Nov 2017 23:49:25 -0600 Subject: [PATCH] Make sure web also dispatches CONFERENCE_WILL_JOIN. --- conference.js | 2 ++ react/features/base/conference/actions.js | 23 +++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/conference.js b/conference.js index 5e5507db9222a..808a6b8064caf 100644 --- a/conference.js +++ b/conference.js @@ -25,6 +25,7 @@ import { conferenceFailed, conferenceJoined, conferenceLeft, + conferenceWillJoin, dataChannelOpened, EMAIL_COMMAND, lockStateChanged, @@ -1249,6 +1250,7 @@ export default { = connection.initJitsiConference( APP.conference.roomName, this._getConferenceOptions()); + APP.store.dispatch(conferenceWillJoin(room)); this._setLocalAudioVideoStreams(localTracks); this._room = room; // FIXME do not use this diff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.js index d1980fe20b6e7..95e64900a7ec1 100644 --- a/react/features/base/conference/actions.js +++ b/react/features/base/conference/actions.js @@ -229,10 +229,25 @@ function _conferenceWillJoin(conference: Object) { _addLocalTracksToConference(conference, localTracks); } - dispatch({ - type: CONFERENCE_WILL_JOIN, - conference - }); + dispatch(conferenceWillJoin(conference)); + }; +} + +/** + * Signals the intention of the application to have the local participant + * join the specified conference. + * + * @param {JitsiConference} conference - The {@code JitsiConference} instance + * the local participant will (try to) join. + * @returns {{ + * type: CONFERENCE_WILL_JOIN, + * conference: JitsiConference + * }} + */ +export function conferenceWillJoin(conference: Object) { + return { + type: CONFERENCE_WILL_JOIN, + conference }; }