robertpin 4 年前
父节点
当前提交
7d3953de51
没有帐户链接到提交者的电子邮件
共有 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

正在加载...
取消
保存