|
@@ -189,9 +189,9 @@ function _sendConferenceEvent(
|
189
|
189
|
|
190
|
190
|
/**
|
191
|
191
|
* Sends {@link CONFERENCE_FAILED} event when the {@link CONNECTION_FAILED}
|
192
|
|
- * occurs. Otherwise the external API will not emit such event, because at this
|
193
|
|
- * point conference has not been created yet and the base/conference feature
|
194
|
|
- * will not emit it.
|
|
192
|
+ * occurs. It should be done only if the connection fails before the conference
|
|
193
|
+ * instance is created. Otherwise the eventual failure event is supposed to be
|
|
194
|
+ * emitted by the base/conference feature.
|
195
|
195
|
*
|
196
|
196
|
* @param {Store} store - The redux store.
|
197
|
197
|
* @param {Action} action - The redux action.
|
|
@@ -199,8 +199,16 @@ function _sendConferenceEvent(
|
199
|
199
|
*/
|
200
|
200
|
function _sendConferenceFailedOnConnectionError(store, action) {
|
201
|
201
|
const { locationURL } = store.getState()['features/base/connection'];
|
|
202
|
+ const { connection } = action;
|
202
|
203
|
|
203
|
|
- locationURL && _sendEvent(
|
|
204
|
+ locationURL
|
|
205
|
+ && forEachConference(
|
|
206
|
+ store,
|
|
207
|
+
|
|
208
|
+ // If there's any conference in the base/conference state then the
|
|
209
|
+ // base/conference feature is supposed to emit a failure.
|
|
210
|
+ conference => conference.getConnection() !== connection)
|
|
211
|
+ && _sendEvent(
|
204
|
212
|
store,
|
205
|
213
|
_getSymbolDescription(CONFERENCE_FAILED),
|
206
|
214
|
/* data */ {
|