Browse Source

feat(vpaas): Send billing id to prosody

master
Vlad Piersec 4 years ago
parent
commit
bfc4b2ac6f

+ 2
- 2
package.json View File

@@ -49,14 +49,14 @@
49 49
     "i18next": "17.0.6",
50 50
     "i18next-browser-languagedetector": "3.0.1",
51 51
     "i18next-xhr-backend": "3.0.0",
52
-    "jQuery-Impromptu": "github:trentrichardson/jQuery-Impromptu#v6.0.0",
53 52
     "jitsi-meet-logger": "github:jitsi/jitsi-meet-logger#v1.0.0",
54 53
     "jquery": "3.5.1",
55 54
     "jquery-contextmenu": "2.4.5",
56 55
     "jquery-i18next": "1.2.1",
56
+    "jQuery-Impromptu": "github:trentrichardson/jQuery-Impromptu#v6.0.0",
57 57
     "js-md5": "0.6.1",
58 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 60
     "libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
61 61
     "lodash": "4.17.19",
62 62
     "moment": "2.19.4",

+ 12
- 1
react/features/billing-counter/functions.js View File

@@ -78,7 +78,6 @@ export async function sendCountRequest({ baseUrl, billingId, jwt, tenant }: {
78 78
  * @returns {string}
79 79
  */
80 80
 export function getBillingId() {
81
-
82 81
     let billingId = jitsiLocalStorage.getItem(BILLING_ID);
83 82
 
84 83
     if (!billingId) {
@@ -88,3 +87,15 @@ export function getBillingId() {
88 87
 
89 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 View File

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

Loading…
Cancel
Save