feat(end-meet-for-all) Trigger notifyReadyToClose event on end meetin… (#10549)

This commit is contained in:
Horatiu Muresan 2021-12-08 16:11:31 +02:00 committed by GitHub
parent 0188086dde
commit 9b3f254c6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -27,3 +27,7 @@ export const EMAIL_COMMAND = 'email';
* from the outside is not cool but it should suffice for now.
*/
export const JITSI_CONFERENCE_URL_KEY = Symbol('url');
export const TRIGGER_READY_TO_CLOSE_REASONS = [
'The meeting has been terminated'
];

View File

@ -1,5 +1,6 @@
// @flow
import { readyToClose } from '../../../features/mobile/external-api/actions';
import {
ACTION_PINNED,
ACTION_UNPINNED,
@ -40,6 +41,7 @@ import {
createConference,
setSubject
} from './actions';
import { TRIGGER_READY_TO_CLOSE_REASONS } from './constants';
import {
_addLocalTracksToConference,
_removeLocalTracksFromConference,
@ -130,6 +132,14 @@ function _conferenceFailed({ dispatch, getState }, next, action) {
titleKey: 'dialog.sessTerminated'
}, NOTIFICATION_TIMEOUT_TYPE.LONG));
if (TRIGGER_READY_TO_CLOSE_REASONS.includes(reason)) {
if (typeof APP === undefined) {
dispatch(readyToClose());
} else {
APP.API.notifyReadyToClose();
}
}
break;
}
case JitsiConferenceErrors.CONFERENCE_RESTARTED: {