diff --git a/react/features/base/conference/middleware.js b/react/features/base/conference/middleware.js index 76a5e59ee..95e1ca326 100644 --- a/react/features/base/conference/middleware.js +++ b/react/features/base/conference/middleware.js @@ -37,7 +37,8 @@ import { DATA_CHANNEL_OPENED, SET_AUDIO_ONLY, SET_LASTN, - SET_PENDING_SUBJECT_CHANGE + SET_PENDING_SUBJECT_CHANGE, + SET_ROOM } from './actionTypes'; import { _addLocalTracksToConference, @@ -98,6 +99,9 @@ MiddlewareRegistry.register(store => next => action => { case SET_LASTN: return _setLastN(store, next, action); + case SET_ROOM: + return _setRoom(store, next, action); + case TRACK_ADDED: case TRACK_REMOVED: return _trackAddedOrRemoved(store, next, action); @@ -569,6 +573,33 @@ function _setReceiverVideoConstraint(conference, preferred, max) { } } +/** + * Notifies the feature base/conference that the action + * {@code SET_ROOM} is being dispatched within a specific + * redux store. + * + * @param {Store} store - The redux store in which the specified {@code action} + * is being dispatched. + * @param {Dispatch} next - The redux {@code dispatch} function to dispatch the + * specified {@code action} to the specified {@code store}. + * @param {Action} action - The redux action {@code SET_ROOM} + * which is being dispatched in the specified {@code store}. + * @private + * @returns {Object} The value returned by {@code next(action)}. + */ +function _setRoom({ dispatch, getState }, next, action) { + const state = getState(); + const { subject } = state['features/base/config']; + const { room } = action; + + if (room) { + // Set the stored subject. + dispatch(setSubject(subject)); + } + + return next(action); +} + /** * Synchronizes local tracks from state with local tracks in JitsiConference * instance. diff --git a/react/features/base/config/functions.any.js b/react/features/base/config/functions.any.js index 8ee7f2229..0caefd1fb 100644 --- a/react/features/base/config/functions.any.js +++ b/react/features/base/config/functions.any.js @@ -136,6 +136,7 @@ const WHITELISTED_KEYS = [ 'startVideoMuted', 'startWithAudioMuted', 'startWithVideoMuted', + 'subject', 'testing', 'useIPv6', 'useNicks',