Renames functions for the sake of clarity.
This commit is contained in:
parent
ee95e99f57
commit
84a8d00234
|
@ -767,12 +767,12 @@ function dump(elem, filename) {
|
||||||
elem = elem.parentNode;
|
elem = elem.parentNode;
|
||||||
elem.download = filename || 'meetlog.json';
|
elem.download = filename || 'meetlog.json';
|
||||||
elem.href = 'data:application/json;charset=utf-8,\n';
|
elem.href = 'data:application/json;charset=utf-8,\n';
|
||||||
var data = APP.xmpp.populateData();
|
var data = APP.xmpp.getJingleLog();
|
||||||
var metadata = {};
|
var metadata = {};
|
||||||
metadata.time = new Date();
|
metadata.time = new Date();
|
||||||
metadata.url = window.location.href;
|
metadata.url = window.location.href;
|
||||||
metadata.ua = navigator.userAgent;
|
metadata.ua = navigator.userAgent;
|
||||||
var log = APP.xmpp.getLogger();
|
var log = APP.xmpp.getXmppLog();
|
||||||
if (log) {
|
if (log) {
|
||||||
metadata.xmpp = log;
|
metadata.xmpp = log;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ var Authentication = {
|
||||||
Moderator.allocateConferenceFocus(roomName, function () {
|
Moderator.allocateConferenceFocus(roomName, function () {
|
||||||
// If it's not "on the fly" authentication now join
|
// If it's not "on the fly" authentication now join
|
||||||
// the conference room
|
// the conference room
|
||||||
if (!APP.xmpp.getMUCJoined()) {
|
if (!APP.xmpp.isMUCJoined()) {
|
||||||
APP.UI.checkForNicknameAndJoin();
|
APP.UI.checkForNicknameAndJoin();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -298,7 +298,7 @@ var Toolbar = (function (my) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Get authentication URL
|
// Get authentication URL
|
||||||
if (!APP.xmpp.getMUCJoined()) {
|
if (!APP.xmpp.isMUCJoined()) {
|
||||||
APP.xmpp.getLoginUrl(UI.getRoomName(), function (url) {
|
APP.xmpp.getLoginUrl(UI.getRoomName(), function (url) {
|
||||||
// If conference has not been started yet - redirect to login page
|
// If conference has not been started yet - redirect to login page
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
*/
|
*/
|
||||||
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
|
var XMPPEvents = require("../../service/xmpp/XMPPEvents");
|
||||||
var Moderator = require("./moderator");
|
var Moderator = require("./moderator");
|
||||||
var JingleSession = require("./JingleSession");
|
|
||||||
|
|
||||||
var bridgeIsDown = false;
|
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 data = {};
|
||||||
var self = this;
|
var self = this;
|
||||||
Object.keys(this.sessions).forEach(function (sid) {
|
Object.keys(this.sessions).forEach(function (sid) {
|
||||||
|
|
|
@ -482,17 +482,13 @@ var XMPP = {
|
||||||
connection.send(message);
|
connection.send(message);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
populateData: function () {
|
// Gets the logs from strophe.jingle.
|
||||||
var data = {};
|
getJingleLog: function () {
|
||||||
if (connection.jingle) {
|
return connection.jingle ? connection.jingle.getLog() : {};
|
||||||
data = connection.jingle.populateData();
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
},
|
},
|
||||||
getLogger: function () {
|
// Gets the logs from strophe.
|
||||||
if(connection.logger)
|
getXmppLog: function () {
|
||||||
return connection.logger.log;
|
return connection.logger ? connection.logger.log : null;
|
||||||
return null;
|
|
||||||
},
|
},
|
||||||
getPrezi: function () {
|
getPrezi: function () {
|
||||||
return connection.emuc.getPrezi(this.myJid());
|
return connection.emuc.getPrezi(this.myJid());
|
||||||
|
@ -533,7 +529,8 @@ var XMPP = {
|
||||||
return null;
|
return null;
|
||||||
return connection.jingle.activecall.getSsrcOwner(ssrc);
|
return connection.jingle.activecall.getSsrcOwner(ssrc);
|
||||||
},
|
},
|
||||||
getMUCJoined: function () {
|
// Returns true iff we have joined the MUC.
|
||||||
|
isMUCJoined: function () {
|
||||||
return connection.emuc.joined;
|
return connection.emuc.joined;
|
||||||
},
|
},
|
||||||
getSessions: function () {
|
getSessions: function () {
|
||||||
|
|
Loading…
Reference in New Issue