fix(jaas) fix recorder and sip gateways not detecting vpaas meetings

This commit is contained in:
Tudor-Ovidiu Avram 2021-04-20 15:35:36 +03:00
parent 9e6939d25f
commit c6fd8c2bcb
1 changed files with 7 additions and 2 deletions

View File

@ -29,11 +29,16 @@ export function extractVpaasTenantFromPath(path: string) {
* @returns {boolean}
*/
export function isVpaasMeeting(state: Object) {
const { billingCounterUrl, iAmRecorder, iAmSipGateway } = state['features/base/config'];
const { jwt } = state['features/base/jwt'];
const isAllowed = iAmRecorder || iAmSipGateway || Boolean(jwt);
return Boolean(
state['features/base/config'].billingCounterUrl
&& state['features/base/jwt'].jwt
billingCounterUrl
&& extractVpaasTenantFromPath(
state['features/base/connection'].locationURL.pathname)
&& isAllowed
);
}