robertpin преди 3 години
родител
ревизия
7d3953de51
No account linked to committer's email address
променени са 2 файла, в които са добавени 6 реда и са изтрити 3 реда
  1. 1
    1
      connection.js
  2. 5
    2
      react/features/billing-counter/functions.js

+ 1
- 1
connection.js Целия файл

@@ -90,7 +90,7 @@ export async function connect(id, password, roomName) {
90 90
     const state = APP.store.getState();
91 91
     let { jwt } = state['features/base/jwt'];
92 92
 
93
-    if (!jwt && isVpaasMeeting(state)) {
93
+    if (!jwt && isVpaasMeeting(state, false)) {
94 94
         jwt = await getJaasJWT(state);
95 95
         APP.store.dispatch(setJWT(jwt));
96 96
     }

+ 5
- 2
react/features/billing-counter/functions.js Целия файл

@@ -36,13 +36,16 @@ export function getVpaasTenant(state: Object) {
36 36
  * Returns true if the current meeting is a vpaas one.
37 37
  *
38 38
  * @param {Object} state - The state of the app.
39
+ * @param {boolean} requiredJwt - Whether jwt is required or not.
39 40
  * @returns {boolean}
40 41
  */
41
-export function isVpaasMeeting(state: Object) {
42
+export function isVpaasMeeting(state: Object, requiredJwt: boolean = true) {
42 43
     const { billingCounterUrl, iAmRecorder, iAmSipGateway } = state['features/base/config'];
43 44
     const { jwt } = state['features/base/jwt'];
44 45
 
45
-    const isAllowed = iAmRecorder || iAmSipGateway || Boolean(jwt);
46
+    const jwtBoolean = requiredJwt ? Boolean(jwt) : true;
47
+
48
+    const isAllowed = iAmRecorder || iAmSipGateway || jwtBoolean;
46 49
 
47 50
     return Boolean(
48 51
         billingCounterUrl

Loading…
Отказ
Запис