diff --git a/modules/UI/Feedback.js b/modules/UI/Feedback.js index c9bbea0d6..a9ca1155e 100644 --- a/modules/UI/Feedback.js +++ b/modules/UI/Feedback.js @@ -79,7 +79,7 @@ var Feedback = { init: function () { // CallStats is the way we send feedback, so we don't have to initialise // if callstats isn't enabled. - if (!callStats.isEnabled()) + if (!this.isEnabled()) return; $("div.feedbackButton").css("display", "block"); @@ -93,6 +93,9 @@ var Feedback = { * @return true if the feedback functionality is enabled, false otherwise. */ isEnabled: function() { + // XXX callStats.isEnabled() indicates whether we are allowed to attempt + // to integrate callstats.io. Whether our attempt was/is/will be + // successful is a different question. return callStats.isEnabled(); }, /** @@ -234,4 +237,4 @@ var Feedback = { }; // Exports the Feedback class. -module.exports = Feedback; \ No newline at end of file +module.exports = Feedback; diff --git a/modules/statistics/CallStats.js b/modules/statistics/CallStats.js index 73327f0aa..7880421f4 100644 --- a/modules/statistics/CallStats.js +++ b/modules/statistics/CallStats.js @@ -31,7 +31,7 @@ var callStatsIntegrationEnabled = config.callStatsID && config.callStatsSecret; var CallStats = { init: function (jingleSession) { - if(!callStatsIntegrationEnabled || callStats !== null) { + if(!this.isEnabled() || callStats !== null) { return; } @@ -146,7 +146,7 @@ var CallStats = { _reportError: function (type, e, pc) { if (callStats) { callStats.reportError(pc, this.confID, type, e); - } else if (callStatsIntegrationEnabled) { + } else if (this.isEnabled()) { pendingErrors.push({ type: type, error: e,