Updates app.bundle.js

This commit is contained in:
paweldomas 2015-08-28 11:44:19 +02:00
parent 51c23ae133
commit 8956002de5
2 changed files with 34 additions and 5 deletions

View File

@ -20,7 +20,7 @@
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib --> <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
<script src="libs/toastr.js?v=1"></script><!-- notifications lib --> <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
<script src="interface_config.js?v=5"></script> <script src="interface_config.js?v=5"></script>
<script src="libs/app.bundle.js?v=131"></script> <script src="libs/app.bundle.js?v=132"></script>
<script src="analytics.js?v=1"></script><!-- google analytics plugin --> <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
<link rel="stylesheet" href="css/font.css?v=7"/> <link rel="stylesheet" href="css/font.css?v=7"/>
<link rel="stylesheet" href="css/toastr.css?v=1"> <link rel="stylesheet" href="css/toastr.css?v=1">

View File

@ -3577,7 +3577,7 @@ function registerListeners() {
APP.xmpp.addListener(XMPPEvents.ROOM_JOIN_ERROR, function (pres) { APP.xmpp.addListener(XMPPEvents.ROOM_JOIN_ERROR, function (pres) {
UI.messageHandler.openReportDialog(null, UI.messageHandler.openReportDialog(null,
"dialog.joinError", pres); "dialog.connectError", pres);
}); });
APP.xmpp.addListener(XMPPEvents.ROOM_CONNECT_ERROR, function (pres) { APP.xmpp.addListener(XMPPEvents.ROOM_CONNECT_ERROR, function (pres) {
UI.messageHandler.openReportDialog(null, UI.messageHandler.openReportDialog(null,
@ -12501,8 +12501,7 @@ var CallStats = {
this.userID = APP.xmpp.myResource(); this.userID = APP.xmpp.myResource();
var location = window.location; var location = window.location;
this.confID = location.protocol + "//" + this.confID = location.hostname + location.pathname;
location.hostname + location.pathname;
//userID is generated or given by the origin server //userID is generated or given by the origin server
callStats.initialize(config.callStatsID, callStats.initialize(config.callStatsID,
@ -18895,6 +18894,26 @@ module.exports = function (XMPP, eventEmitter) {
this.connection.sendIQ(iq, success, error, timeout); this.connection.sendIQ(iq, success, error, timeout);
}, },
/**
* Checks if given <tt>jid</tt> has XEP-0199 ping support.
* @param jid the JID to be checked for ping support.
* @param callback function with boolean argument which will be
* <tt>true</tt> if XEP-0199 ping is supported by given <tt>jid</tt>
*/
hasPingSupport: function (jid, callback) {
this.connection.disco.info(
jid, null,
function (result) {
var ping = $(result).find('>>feature[var="urn:xmpp:ping"]');
callback(ping.length > 0);
},
function (error) {
console.error("Ping feature discovery error", error);
callback(false);
}
);
},
/** /**
* Starts to send ping in given interval to specified remote JID. * Starts to send ping in given interval to specified remote JID.
* This plugin supports only one such task and <tt>stopInterval</tt> * This plugin supports only one such task and <tt>stopInterval</tt>
@ -19173,7 +19192,17 @@ function connect(jid, password) {
console.info("My Jabber ID: " + connection.jid); console.info("My Jabber ID: " + connection.jid);
connection.ping.startInterval(config.hosts.domain); // Schedule ping ?
var pingJid = connection.domain;
connection.ping.hasPingSupport(
pingJid,
function (hasPing) {
if (hasPing)
connection.ping.startInterval(pingJid);
else
console.warn("Ping NOT supported by " + pingJid);
}
);
if (password) if (password)
authenticatedUser = true; authenticatedUser = true;