浏览代码

feat(vpaas): Send billing id to prosody

j8
Vlad Piersec 4 年前
父节点
当前提交
bfc4b2ac6f
共有 3 个文件被更改,包括 16 次插入3 次删除
  1. 2
    2
      package.json
  2. 12
    1
      react/features/billing-counter/functions.js
  3. 2
    0
      react/features/conference/functions.web.js

+ 2
- 2
package.json 查看文件

49
     "i18next": "17.0.6",
49
     "i18next": "17.0.6",
50
     "i18next-browser-languagedetector": "3.0.1",
50
     "i18next-browser-languagedetector": "3.0.1",
51
     "i18next-xhr-backend": "3.0.0",
51
     "i18next-xhr-backend": "3.0.0",
52
-    "jQuery-Impromptu": "github:trentrichardson/jQuery-Impromptu#v6.0.0",
53
     "jitsi-meet-logger": "github:jitsi/jitsi-meet-logger#v1.0.0",
52
     "jitsi-meet-logger": "github:jitsi/jitsi-meet-logger#v1.0.0",
54
     "jquery": "3.5.1",
53
     "jquery": "3.5.1",
55
     "jquery-contextmenu": "2.4.5",
54
     "jquery-contextmenu": "2.4.5",
56
     "jquery-i18next": "1.2.1",
55
     "jquery-i18next": "1.2.1",
56
+    "jQuery-Impromptu": "github:trentrichardson/jQuery-Impromptu#v6.0.0",
57
     "js-md5": "0.6.1",
57
     "js-md5": "0.6.1",
58
     "jwt-decode": "2.2.0",
58
     "jwt-decode": "2.2.0",
59
-    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#77978f0e621f463ed606fe94dda25ff18f1d5f64",
59
+    "lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#30c87957701eb9fc6a6b69a5cc6dc273f7955b05",
60
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
60
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
61
     "lodash": "4.17.19",
61
     "lodash": "4.17.19",
62
     "moment": "2.19.4",
62
     "moment": "2.19.4",

+ 12
- 1
react/features/billing-counter/functions.js 查看文件

78
  * @returns {string}
78
  * @returns {string}
79
  */
79
  */
80
 export function getBillingId() {
80
 export function getBillingId() {
81
-
82
     let billingId = jitsiLocalStorage.getItem(BILLING_ID);
81
     let billingId = jitsiLocalStorage.getItem(BILLING_ID);
83
 
82
 
84
     if (!billingId) {
83
     if (!billingId) {
88
 
87
 
89
     return billingId;
88
     return billingId;
90
 }
89
 }
90
+
91
+/**
92
+ * Returns the billing id for vpaas meetings.
93
+ *
94
+ * @param {Object} state - The state of the app.
95
+ * @returns {string | undefined}
96
+ */
97
+export function getVpaasBillingId(state: Object) {
98
+    if (isVpaasMeeting(state)) {
99
+        return getBillingId();
100
+    }
101
+}

+ 2
- 0
react/features/conference/functions.web.js 查看文件

4
 import { getLocalParticipant } from '../base/participants';
4
 import { getLocalParticipant } from '../base/participants';
5
 import { toState } from '../base/redux';
5
 import { toState } from '../base/redux';
6
 import { getBackendSafePath, getJitsiMeetGlobalNS } from '../base/util';
6
 import { getBackendSafePath, getJitsiMeetGlobalNS } from '../base/util';
7
+import { getVpaasBillingId } from '../billing-counter/functions';
7
 import { showWarningNotification } from '../notifications';
8
 import { showWarningNotification } from '../notifications';
8
 import { createRnnoiseProcessorPromise } from '../rnnoise';
9
 import { createRnnoiseProcessorPromise } from '../rnnoise';
9
 
10
 
84
     options.applicationName = getName();
85
     options.applicationName = getName();
85
     options.getWiFiStatsMethod = getWiFiStatsMethod;
86
     options.getWiFiStatsMethod = getWiFiStatsMethod;
86
     options.createVADProcessor = createRnnoiseProcessorPromise;
87
     options.createVADProcessor = createRnnoiseProcessorPromise;
88
+    options.billingId = getVpaasBillingId(state);
87
 
89
 
88
     // Disable CallStats, if requessted.
90
     // Disable CallStats, if requessted.
89
     if (options.disableThirdPartyRequests) {
91
     if (options.disableThirdPartyRequests) {

正在加载...
取消
保存