Renames functions for the sake of clarity.

pull/334/head
Boris Grozev 10 years ago
parent ee95e99f57
commit 84a8d00234
  1. 4
      modules/UI/UI.js
  2. 2
      modules/UI/authentication/Authentication.js
  3. 2
      modules/UI/toolbars/Toolbar.js
  4. 1
      modules/xmpp/strophe.emuc.js
  5. 4
      modules/xmpp/strophe.jingle.js
  6. 19
      modules/xmpp/xmpp.js

@ -767,12 +767,12 @@ function dump(elem, filename) {
elem = elem.parentNode;
elem.download = filename || 'meetlog.json';
elem.href = 'data:application/json;charset=utf-8,\n';
var data = APP.xmpp.populateData();
var data = APP.xmpp.getJingleLog();
var metadata = {};
metadata.time = new Date();
metadata.url = window.location.href;
metadata.ua = navigator.userAgent;
var log = APP.xmpp.getLogger();
var log = APP.xmpp.getXmppLog();
if (log) {
metadata.xmpp = log;
}

@ -79,7 +79,7 @@ var Authentication = {
Moderator.allocateConferenceFocus(roomName, function () {
// If it's not "on the fly" authentication now join
// the conference room
if (!APP.xmpp.getMUCJoined()) {
if (!APP.xmpp.isMUCJoined()) {
APP.UI.checkForNicknameAndJoin();
}
});

@ -298,7 +298,7 @@ var Toolbar = (function (my) {
return;
}
// Get authentication URL
if (!APP.xmpp.getMUCJoined()) {
if (!APP.xmpp.isMUCJoined()) {
APP.xmpp.getLoginUrl(UI.getRoomName(), function (url) {
// If conference has not been started yet - redirect to login page
window.location.href = url;

@ -4,7 +4,6 @@
*/
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
var Moderator = require("./moderator");
var JingleSession = require("./JingleSession");
var bridgeIsDown = false;

@ -329,9 +329,9 @@ module.exports = function(XMPP, eventEmitter)
},
/**
* Populates the log data
* Returns the data saved in 'updateLog' in a format to be logged.
*/
populateData: function () {
getLog: function () {
var data = {};
var self = this;
Object.keys(this.sessions).forEach(function (sid) {

@ -482,17 +482,13 @@ var XMPP = {
connection.send(message);
return true;
},
populateData: function () {
var data = {};
if (connection.jingle) {
data = connection.jingle.populateData();
}
return data;
// Gets the logs from strophe.jingle.
getJingleLog: function () {
return connection.jingle ? connection.jingle.getLog() : {};
},
getLogger: function () {
if(connection.logger)
return connection.logger.log;
return null;
// Gets the logs from strophe.
getXmppLog: function () {
return connection.logger ? connection.logger.log : null;
},
getPrezi: function () {
return connection.emuc.getPrezi(this.myJid());
@ -533,7 +529,8 @@ var XMPP = {
return null;
return connection.jingle.activecall.getSsrcOwner(ssrc);
},
getMUCJoined: function () {
// Returns true iff we have joined the MUC.
isMUCJoined: function () {
return connection.emuc.joined;
},
getSessions: function () {

Loading…
Cancel
Save