|
|
@@ -285,19 +285,13 @@ JitsiConference.prototype._init = function(options = {}) {
|
|
285
|
285
|
}
|
|
286
|
286
|
|
|
287
|
287
|
const { config } = this.options;
|
|
288
|
|
- const statsCurrentId = config.enableEmailInStats && config.email
|
|
289
|
|
- ? config.email : Settings.callStatsUserName;
|
|
290
|
|
- const createRoomOptions = {
|
|
291
|
|
- ...config
|
|
292
|
|
- };
|
|
293
|
|
-
|
|
294
|
|
- if (config.enableStatsID) {
|
|
295
|
|
- createRoomOptions.statsId = statsCurrentId;
|
|
296
|
|
- }
|
|
|
288
|
+ const statsCurrentId = config.statisticsId ? config.statisticsId : Settings.callStatsUserName;
|
|
297
|
289
|
|
|
298
|
290
|
this.room = this.xmpp.createRoom(
|
|
299
|
|
- this.options.name,
|
|
300
|
|
- createRoomOptions,
|
|
|
291
|
+ this.options.name, {
|
|
|
292
|
+ ...config,
|
|
|
293
|
+ statsId: statsCurrentId
|
|
|
294
|
+ },
|
|
301
|
295
|
JitsiConference.resourceCreator
|
|
302
|
296
|
);
|
|
303
|
297
|
|
|
|
@@ -354,25 +348,9 @@ JitsiConference.prototype._init = function(options = {}) {
|
|
354
|
348
|
this.participantConnectionStatus.init();
|
|
355
|
349
|
|
|
356
|
350
|
if (!this.statistics) {
|
|
357
|
|
- let aliasName = this.myUserId();
|
|
358
|
|
- let userName = statsCurrentId;
|
|
359
|
|
-
|
|
360
|
|
- if (config.enableDisplayNameInStats && config.displayName) {
|
|
361
|
|
- aliasName = config.displayName;
|
|
362
|
|
- }
|
|
363
|
|
-
|
|
364
|
|
- if (config.enableStatsID) {
|
|
365
|
|
- // let's swap the values, as instead of components to report
|
|
366
|
|
- // the xmpp resource as id will use the supplied statsId
|
|
367
|
|
- const newAlias = userName;
|
|
368
|
|
-
|
|
369
|
|
- userName = aliasName;
|
|
370
|
|
- aliasName = newAlias;
|
|
371
|
|
- }
|
|
372
|
|
-
|
|
373
|
351
|
this.statistics = new Statistics(this.xmpp, {
|
|
374
|
|
- aliasName,
|
|
375
|
|
- userName,
|
|
|
352
|
+ aliasName: statsCurrentId,
|
|
|
353
|
+ userName: config.statisticsDisplayName ? config.statisticsDisplayName : this.myUserId(),
|
|
376
|
354
|
callStatsConfIDNamespace: this.connection.options.hosts.domain,
|
|
377
|
355
|
confID: config.confID || `${this.connection.options.hosts.domain}/${this.options.name}`,
|
|
378
|
356
|
customScriptUrl: config.callStatsCustomScriptUrl,
|
|
|
@@ -383,7 +361,7 @@ JitsiConference.prototype._init = function(options = {}) {
|
|
383
|
361
|
getWiFiStatsMethod: config.getWiFiStatsMethod
|
|
384
|
362
|
});
|
|
385
|
363
|
Statistics.analytics.addPermanentProperties({
|
|
386
|
|
- 'callstats_name': aliasName
|
|
|
364
|
+ 'callstats_name': statsCurrentId
|
|
387
|
365
|
});
|
|
388
|
366
|
}
|
|
389
|
367
|
|
|
|
@@ -2553,12 +2531,10 @@ JitsiConference.prototype._acceptP2PIncomingCall = function(
|
|
2553
|
2531
|
|
|
2554
|
2532
|
let remoteID = Strophe.getResourceFromJid(this.p2pJingleSession.remoteJid);
|
|
2555
|
2533
|
|
|
2556
|
|
- if (this.options.config.enableStatsID) {
|
|
2557
|
|
- const participant = this.participants[remoteID];
|
|
|
2534
|
+ const participant = this.participants[remoteID];
|
|
2558
|
2535
|
|
|
2559
|
|
- if (participant) {
|
|
2560
|
|
- remoteID = participant.getStatsID() || remoteID;
|
|
2561
|
|
- }
|
|
|
2536
|
+ if (participant) {
|
|
|
2537
|
+ remoteID = participant.getStatsID() || remoteID;
|
|
2562
|
2538
|
}
|
|
2563
|
2539
|
|
|
2564
|
2540
|
this.statistics.startCallStats(
|
|
|
@@ -2903,12 +2879,10 @@ JitsiConference.prototype._startP2PSession = function(remoteJid) {
|
|
2903
|
2879
|
|
|
2904
|
2880
|
let remoteID = Strophe.getResourceFromJid(this.p2pJingleSession.remoteJid);
|
|
2905
|
2881
|
|
|
2906
|
|
- if (this.options.config.enableStatsID) {
|
|
2907
|
|
- const participant = this.participants[remoteID];
|
|
|
2882
|
+ const participant = this.participants[remoteID];
|
|
2908
|
2883
|
|
|
2909
|
|
- if (participant) {
|
|
2910
|
|
- remoteID = participant.getStatsID() || remoteID;
|
|
2911
|
|
- }
|
|
|
2884
|
+ if (participant) {
|
|
|
2885
|
+ remoteID = participant.getStatsID() || remoteID;
|
|
2912
|
2886
|
}
|
|
2913
|
2887
|
|
|
2914
|
2888
|
this.statistics.startCallStats(
|