feat(api): notify of password required
This commit is contained in:
committed by
virtuacoplenny
parent
97e0303065
commit
ae3b70eb13
+33
-1
@@ -5,7 +5,7 @@ import {
|
||||
createApiEvent,
|
||||
sendAnalytics
|
||||
} from '../../react/features/analytics';
|
||||
import { setSubject } from '../../react/features/base/conference';
|
||||
import { setPassword, setSubject } from '../../react/features/base/conference';
|
||||
import { parseJWTFromURLParams } from '../../react/features/base/jwt';
|
||||
import { invite } from '../../react/features/invite';
|
||||
import { toggleTileView } from '../../react/features/video-layout';
|
||||
@@ -65,6 +65,28 @@ function initCommands() {
|
||||
sendAnalytics(createApiEvent('display.name.changed'));
|
||||
APP.conference.changeLocalDisplayName(displayName);
|
||||
},
|
||||
'password': password => {
|
||||
const { conference, passwordRequired }
|
||||
= APP.store.getState()['features/base/conference'];
|
||||
|
||||
if (passwordRequired) {
|
||||
sendAnalytics(createApiEvent('submit.password'));
|
||||
|
||||
APP.store.dispatch(setPassword(
|
||||
passwordRequired,
|
||||
passwordRequired.join,
|
||||
password
|
||||
));
|
||||
} else {
|
||||
sendAnalytics(createApiEvent('password.changed'));
|
||||
|
||||
APP.store.dispatch(setPassword(
|
||||
conference,
|
||||
conference.lock,
|
||||
password
|
||||
));
|
||||
}
|
||||
},
|
||||
'proxy-connection-event': event => {
|
||||
APP.conference.onProxyConnectionEvent(event);
|
||||
},
|
||||
@@ -627,6 +649,16 @@ class API {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify external application of the current meeting requiring a password
|
||||
* to join.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
notifyOnPasswordRequired() {
|
||||
this._sendEvent({ name: 'password-required' });
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify external application (if API is enabled) that the screen sharing
|
||||
* has been turned on/off.
|
||||
|
||||
Reference in New Issue
Block a user