diff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.js index 23232b572..77fd1629f 100644 --- a/react/features/base/conference/actions.js +++ b/react/features/base/conference/actions.js @@ -759,10 +759,6 @@ export function setSubject(subject: string = '') { const { conference } = getState()['features/base/conference']; if (conference) { - dispatch({ - type: SET_PENDING_SUBJECT_CHANGE, - subject: undefined - }); conference.setSubject(subject); } else { dispatch({ diff --git a/react/features/base/conference/middleware.js b/react/features/base/conference/middleware.js index db67ed786..76a5e59ee 100644 --- a/react/features/base/conference/middleware.js +++ b/react/features/base/conference/middleware.js @@ -36,7 +36,8 @@ import { CONFERENCE_WILL_LEAVE, DATA_CHANNEL_OPENED, SET_AUDIO_ONLY, - SET_LASTN + SET_LASTN, + SET_PENDING_SUBJECT_CHANGE } from './actionTypes'; import { _addLocalTracksToConference, @@ -324,10 +325,17 @@ function _connectionFailed({ dispatch, getState }, next, action) { * @private * @returns {Object} The value returned by {@code next(action)}. */ -function _conferenceSubjectChanged({ getState }, next, action) { +function _conferenceSubjectChanged({ dispatch, getState }, next, action) { const result = next(action); const { subject } = getState()['features/base/conference']; + if (subject) { + dispatch({ + type: SET_PENDING_SUBJECT_CHANGE, + subject: undefined + }); + } + typeof APP === 'object' && APP.API.notifySubjectChanged(subject); return result;