|
@@ -73,7 +73,8 @@ function _initCallStatsBackend(options) {
|
73
|
73
|
aliasName: options.swapUserNameAndAlias
|
74
|
74
|
? userName : options.callStatsAliasName,
|
75
|
75
|
applicationName: options.applicationName,
|
76
|
|
- getWiFiStatsMethod: options.getWiFiStatsMethod
|
|
76
|
+ getWiFiStatsMethod: options.getWiFiStatsMethod,
|
|
77
|
+ confID: options.confID
|
77
|
78
|
})) {
|
78
|
79
|
logger.error('CallStats Backend initialization failed bad');
|
79
|
80
|
}
|
|
@@ -129,13 +130,11 @@ Statistics.init = function(options) {
|
129
|
130
|
* callstats.
|
130
|
131
|
* @property {string} callStatsAliasName - The alias name to use when
|
131
|
132
|
* initializing callstats.
|
132
|
|
- * @property {string} callStatsConfIDNamespace - A namespace to prepend the
|
133
|
|
- * callstats conference ID with.
|
|
133
|
+ * @property {string} confID - The callstats conference ID to use.
|
134
|
134
|
* @property {string} callStatsID - Callstats credentials - the id.
|
135
|
135
|
* @property {string} callStatsSecret - Callstats credentials - the secret.
|
136
|
136
|
* @property {string} customScriptUrl - A custom lib url to use when downloading
|
137
|
137
|
* callstats library.
|
138
|
|
- * @property {string} roomName - The room name we are currently in.
|
139
|
138
|
* @property {boolean} swapUserNameAndAlias - Whether to swap the places of
|
140
|
139
|
* username and alias when initiating callstats.
|
141
|
140
|
*/
|
|
@@ -170,8 +169,8 @@ export default function Statistics(xmpp, options) {
|
170
|
169
|
loadCallStatsAPI(this.options);
|
171
|
170
|
}
|
172
|
171
|
|
173
|
|
- if (!this.options.callStatsConfIDNamespace) {
|
174
|
|
- logger.warn('"callStatsConfIDNamespace" is not defined');
|
|
172
|
+ if (!this.options.confID) {
|
|
173
|
+ logger.warn('"confID" is not defined');
|
175
|
174
|
}
|
176
|
175
|
}
|
177
|
176
|
|
|
@@ -368,7 +367,7 @@ Statistics.prototype.startCallStats = function(tpc, remoteUserID) {
|
368
|
367
|
= new CallStats(
|
369
|
368
|
tpc,
|
370
|
369
|
{
|
371
|
|
- confID: this._getCallStatsConfID(),
|
|
370
|
+ confID: this.options.confID,
|
372
|
371
|
remoteUserID
|
373
|
372
|
});
|
374
|
373
|
|
|
@@ -393,19 +392,6 @@ Statistics._getAllCallStatsInstances = function() {
|
393
|
392
|
return csInstances;
|
394
|
393
|
};
|
395
|
394
|
|
396
|
|
-/**
|
397
|
|
- * Constructs the CallStats conference ID based on the options currently
|
398
|
|
- * configured in this instance.
|
399
|
|
- * @return {string}
|
400
|
|
- * @private
|
401
|
|
- */
|
402
|
|
-Statistics.prototype._getCallStatsConfID = function() {
|
403
|
|
- // The conference ID is case sensitive!!!
|
404
|
|
- return this.options.callStatsConfIDNamespace
|
405
|
|
- ? `${this.options.callStatsConfIDNamespace}/${this.options.roomName}`
|
406
|
|
- : this.options.roomName;
|
407
|
|
-};
|
408
|
|
-
|
409
|
395
|
/**
|
410
|
396
|
* Removes the callstats.io instances.
|
411
|
397
|
*/
|
|
@@ -686,7 +672,7 @@ Statistics.sendLog = function(m) {
|
686
|
672
|
* @param comment the comment from the user.
|
687
|
673
|
*/
|
688
|
674
|
Statistics.prototype.sendFeedback = function(overall, comment) {
|
689
|
|
- CallStats.sendFeedback(this._getCallStatsConfID(), overall, comment);
|
|
675
|
+ CallStats.sendFeedback(this.options.confID, overall, comment);
|
690
|
676
|
Statistics.analytics.sendEvent(
|
691
|
677
|
FEEDBACK,
|
692
|
678
|
{
|