add display name to stats debug info

pull/366/head 688
Emil Ivov 10 years ago
parent 9e4b4bc540
commit 097c008a63
  1. 17
      modules/settings/Settings.js
  2. 6
      modules/statistics/CallStats.js

@ -36,16 +36,33 @@ if (supportsLocalStorage()) {
}
var Settings = {
/**
* Sets the local user display name and saves it to local storage
*
* @param newDisplayName the new display name for the local user
* @returns {string} the display name we just set
*/
setDisplayName: function (newDisplayName) {
displayName = newDisplayName;
window.localStorage.displayname = displayName;
return displayName;
},
/**
* Returns the currently used by the user
* @returns {string} currently valid user display name.
*/
getDisplayName: function () {
return displayName;
},
setEmail: function (newEmail) {
email = newEmail;
window.localStorage.email = newEmail;
return email;
},
getSettings: function () {
return {
email: email,

@ -1,4 +1,6 @@
/* global config, $, APP, Strophe, callstats */
var Settings = require('../settings/Settings');
var jsSHA = require('jssha');
var io = require('socket.io-client');
var callStats = null;
@ -20,6 +22,10 @@ var CallStats = {
this.userID = APP.xmpp.myResource();
//use whatever the user said to facilitate debugging
if(Settings.getDisplayName())
this.userID = Settings.getDisplayName();
var location = window.location;
this.confID = location.hostname + location.pathname;

Loading…
Cancel
Save