Commit 1545018e authored by JC Brand's avatar JC Brand

New release 1.0.2

parent 6550544b
{ {
"name": "converse.js", "name": "converse.js",
"description": "Web-based XMPP/Jabber chat client written in javascript", "description": "Web-based XMPP/Jabber chat client written in javascript",
"version": "1.0.1", "version": "1.0.2",
"license": "MPL-2.0", "license": "MPL-2.0",
"devDependencies": { "devDependencies": {
"jasmine": "https://github.com/jcbrand/jasmine.git#1_3_x", "jasmine": "https://github.com/jcbrand/jasmine.git#1_3_x",
......
...@@ -18799,7 +18799,8 @@ return { ...@@ -18799,7 +18799,8 @@ return {
* The bound function. * The bound function.
*/ */
if (!Function.prototype.bind) { if (!Function.prototype.bind) {
Function.prototype.bind = function (obj /*, arg1, arg2, ... */) { Function.prototype.bind = function (obj /*, arg1, arg2, ... */)
{
var func = this; var func = this;
var _slice = Array.prototype.slice; var _slice = Array.prototype.slice;
var _concat = Array.prototype.concat; var _concat = Array.prototype.concat;
...@@ -18858,7 +18859,6 @@ if (!Array.prototype.indexOf) ...@@ -18858,7 +18859,6 @@ if (!Array.prototype.indexOf)
}; };
} }
})); }));
/* /*
This program is distributed under the terms of the MIT license. This program is distributed under the terms of the MIT license.
Please see the LICENSE file for details. Please see the LICENSE file for details.
...@@ -19081,7 +19081,6 @@ Strophe = { ...@@ -19081,7 +19081,6 @@ Strophe = {
* Status.DISCONNECTED - The connection has been terminated * Status.DISCONNECTED - The connection has been terminated
* Status.DISCONNECTING - The connection is currently being terminated * Status.DISCONNECTING - The connection is currently being terminated
* Status.ATTACHED - The connection has been attached * Status.ATTACHED - The connection has been attached
* Status.CONNTIMEOUT - The connection has timed out
*/ */
Status: { Status: {
ERROR: 0, ERROR: 0,
...@@ -19093,8 +19092,7 @@ Strophe = { ...@@ -19093,8 +19092,7 @@ Strophe = {
DISCONNECTED: 6, DISCONNECTED: 6,
DISCONNECTING: 7, DISCONNECTING: 7,
ATTACHED: 8, ATTACHED: 8,
REDIRECT: 9, REDIRECT: 9
CONNTIMEOUT: 10
}, },
/** Constants: Log Level Constants /** Constants: Log Level Constants
...@@ -19157,7 +19155,8 @@ Strophe = { ...@@ -19157,7 +19155,8 @@ Strophe = {
* referenced under Strophe.NS * referenced under Strophe.NS
* (String) value - The actual namespace. * (String) value - The actual namespace.
*/ */
addNamespace: function (name, value) { addNamespace: function (name, value)
{
Strophe.NS[name] = value; Strophe.NS[name] = value;
}, },
...@@ -19175,7 +19174,8 @@ Strophe = { ...@@ -19175,7 +19174,8 @@ Strophe = {
* (Function) func - The function to apply to each child. This * (Function) func - The function to apply to each child. This
* function should take a single argument, a DOM element. * function should take a single argument, a DOM element.
*/ */
forEachChild: function (elem, elemName, func) { forEachChild: function (elem, elemName, func)
{
var i, childNode; var i, childNode;
for (i = 0; i < elem.childNodes.length; i++) { for (i = 0; i < elem.childNodes.length; i++) {
...@@ -19200,7 +19200,8 @@ Strophe = { ...@@ -19200,7 +19200,8 @@ Strophe = {
* true if the element's tag name matches _el_, and false * true if the element's tag name matches _el_, and false
* otherwise. * otherwise.
*/ */
isTagEqual: function (el, name) { isTagEqual: function (el, name)
{
return el.tagName == name; return el.tagName == name;
}, },
...@@ -19298,7 +19299,8 @@ Strophe = { ...@@ -19298,7 +19299,8 @@ Strophe = {
* Returns: * Returns:
* A new XML DOM element. * A new XML DOM element.
*/ */
xmlElement: function (name) { xmlElement: function (name)
{
if (!name) { return null; } if (!name) { return null; }
var node = Strophe.xmlGenerator().createElement(name); var node = Strophe.xmlGenerator().createElement(name);
...@@ -19387,7 +19389,8 @@ Strophe = { ...@@ -19387,7 +19389,8 @@ Strophe = {
* Returns: * Returns:
* A new XML DOM text node. * A new XML DOM text node.
*/ */
xmlTextNode: function (text) { xmlTextNode: function (text)
{
return Strophe.xmlGenerator().createTextNode(text); return Strophe.xmlGenerator().createTextNode(text);
}, },
...@@ -19400,7 +19403,8 @@ Strophe = { ...@@ -19400,7 +19403,8 @@ Strophe = {
* Returns: * Returns:
* A new XML DOM text node. * A new XML DOM text node.
*/ */
xmlHtmlNode: function (html) { xmlHtmlNode: function (html)
{
var node; var node;
//ensure text is escaped //ensure text is escaped
if (window.DOMParser) { if (window.DOMParser) {
...@@ -19423,7 +19427,8 @@ Strophe = { ...@@ -19423,7 +19427,8 @@ Strophe = {
* Returns: * Returns:
* A String with the concatenated text of all text element children. * A String with the concatenated text of all text element children.
*/ */
getText: function (elem) { getText: function (elem)
{
if (!elem) { return null; } if (!elem) { return null; }
var str = ""; var str = "";
...@@ -19453,7 +19458,8 @@ Strophe = { ...@@ -19453,7 +19458,8 @@ Strophe = {
* Returns: * Returns:
* A new, copied DOM element tree. * A new, copied DOM element tree.
*/ */
copyElement: function (elem) { copyElement: function (elem)
{
var i, el; var i, el;
if (elem.nodeType == Strophe.ElementType.NORMAL) { if (elem.nodeType == Strophe.ElementType.NORMAL) {
el = Strophe.xmlElement(elem.tagName); el = Strophe.xmlElement(elem.tagName);
...@@ -19486,7 +19492,8 @@ Strophe = { ...@@ -19486,7 +19492,8 @@ Strophe = {
* Returns: * Returns:
* A new, copied DOM element tree. * A new, copied DOM element tree.
*/ */
createHtml: function (elem) { createHtml: function (elem)
{
var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue; var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue;
if (elem.nodeType == Strophe.ElementType.NORMAL) { if (elem.nodeType == Strophe.ElementType.NORMAL) {
tag = elem.nodeName.toLowerCase(); // XHTML tags must be lower case. tag = elem.nodeName.toLowerCase(); // XHTML tags must be lower case.
...@@ -19558,7 +19565,8 @@ Strophe = { ...@@ -19558,7 +19565,8 @@ Strophe = {
* Returns: * Returns:
* An escaped node (or local part). * An escaped node (or local part).
*/ */
escapeNode: function (node) { escapeNode: function (node)
{
if (typeof node !== "string") { return node; } if (typeof node !== "string") { return node; }
return node.replace(/^\s+|\s+$/g, '') return node.replace(/^\s+|\s+$/g, '')
.replace(/\\/g, "\\5c") .replace(/\\/g, "\\5c")
...@@ -19582,7 +19590,8 @@ Strophe = { ...@@ -19582,7 +19590,8 @@ Strophe = {
* Returns: * Returns:
* An unescaped node (or local part). * An unescaped node (or local part).
*/ */
unescapeNode: function (node) { unescapeNode: function (node)
{
if (typeof node !== "string") { return node; } if (typeof node !== "string") { return node; }
return node.replace(/\\20/g, " ") return node.replace(/\\20/g, " ")
.replace(/\\22/g, '"') .replace(/\\22/g, '"')
...@@ -19605,7 +19614,8 @@ Strophe = { ...@@ -19605,7 +19614,8 @@ Strophe = {
* Returns: * Returns:
* A String containing the node. * A String containing the node.
*/ */
getNodeFromJid: function (jid) { getNodeFromJid: function (jid)
{
if (jid.indexOf("@") < 0) { return null; } if (jid.indexOf("@") < 0) { return null; }
return jid.split("@")[0]; return jid.split("@")[0];
}, },
...@@ -19619,7 +19629,8 @@ Strophe = { ...@@ -19619,7 +19629,8 @@ Strophe = {
* Returns: * Returns:
* A String containing the domain. * A String containing the domain.
*/ */
getDomainFromJid: function (jid) { getDomainFromJid: function (jid)
{
var bare = Strophe.getBareJidFromJid(jid); var bare = Strophe.getBareJidFromJid(jid);
if (bare.indexOf("@") < 0) { if (bare.indexOf("@") < 0) {
return bare; return bare;
...@@ -19639,7 +19650,8 @@ Strophe = { ...@@ -19639,7 +19650,8 @@ Strophe = {
* Returns: * Returns:
* A String containing the resource. * A String containing the resource.
*/ */
getResourceFromJid: function (jid) { getResourceFromJid: function (jid)
{
var s = jid.split("/"); var s = jid.split("/");
if (s.length < 2) { return null; } if (s.length < 2) { return null; }
s.splice(0, 1); s.splice(0, 1);
...@@ -19655,7 +19667,8 @@ Strophe = { ...@@ -19655,7 +19667,8 @@ Strophe = {
* Returns: * Returns:
* A String containing the bare JID. * A String containing the bare JID.
*/ */
getBareJidFromJid: function (jid) { getBareJidFromJid: function (jid)
{
return jid ? jid.split("/")[0] : null; return jid ? jid.split("/")[0] : null;
}, },
...@@ -19689,7 +19702,8 @@ Strophe = { ...@@ -19689,7 +19702,8 @@ Strophe = {
* (String) msg - The log message. * (String) msg - The log message.
*/ */
/* jshint ignore:start */ /* jshint ignore:start */
log: function (level, msg) { log: function (level, msg)
{
return; return;
}, },
/* jshint ignore:end */ /* jshint ignore:end */
...@@ -19711,7 +19725,8 @@ Strophe = { ...@@ -19711,7 +19725,8 @@ Strophe = {
* Parameters: * Parameters:
* (String) msg - The log message. * (String) msg - The log message.
*/ */
info: function (msg) { info: function (msg)
{
this.log(this.LogLevel.INFO, msg); this.log(this.LogLevel.INFO, msg);
}, },
...@@ -19721,7 +19736,8 @@ Strophe = { ...@@ -19721,7 +19736,8 @@ Strophe = {
* Parameters: * Parameters:
* (String) msg - The log message. * (String) msg - The log message.
*/ */
warn: function (msg) { warn: function (msg)
{
this.log(this.LogLevel.WARN, msg); this.log(this.LogLevel.WARN, msg);
}, },
...@@ -19731,7 +19747,8 @@ Strophe = { ...@@ -19731,7 +19747,8 @@ Strophe = {
* Parameters: * Parameters:
* (String) msg - The log message. * (String) msg - The log message.
*/ */
error: function (msg) { error: function (msg)
{
this.log(this.LogLevel.ERROR, msg); this.log(this.LogLevel.ERROR, msg);
}, },
...@@ -19741,7 +19758,8 @@ Strophe = { ...@@ -19741,7 +19758,8 @@ Strophe = {
* Parameters: * Parameters:
* (String) msg - The log message. * (String) msg - The log message.
*/ */
fatal: function (msg) { fatal: function (msg)
{
this.log(this.LogLevel.FATAL, msg); this.log(this.LogLevel.FATAL, msg);
}, },
...@@ -19754,7 +19772,8 @@ Strophe = { ...@@ -19754,7 +19772,8 @@ Strophe = {
* Returns: * Returns:
* The serialized element tree as a String. * The serialized element tree as a String.
*/ */
serialize: function (elem) { serialize: function (elem)
{
var result; var result;
if (!elem) { return null; } if (!elem) { return null; }
...@@ -19827,7 +19846,8 @@ Strophe = { ...@@ -19827,7 +19846,8 @@ Strophe = {
* (String) name - The name of the extension. * (String) name - The name of the extension.
* (Object) ptype - The plugin's prototype. * (Object) ptype - The plugin's prototype.
*/ */
addConnectionPlugin: function (name, ptype) { addConnectionPlugin: function (name, ptype)
{
Strophe._connectionPlugins[name] = ptype; Strophe._connectionPlugins[name] = ptype;
} }
}; };
...@@ -19873,7 +19893,8 @@ Strophe = { ...@@ -19873,7 +19893,8 @@ Strophe = {
* Returns: * Returns:
* A new Strophe.Builder. * A new Strophe.Builder.
*/ */
Strophe.Builder = function (name, attrs) { Strophe.Builder = function (name, attrs)
{
// Set correct namespace for jabber:client elements // Set correct namespace for jabber:client elements
if (name == "presence" || name == "message" || name == "iq") { if (name == "presence" || name == "message" || name == "iq") {
if (attrs && !attrs.xmlns) { if (attrs && !attrs.xmlns) {
...@@ -19900,7 +19921,8 @@ Strophe.Builder.prototype = { ...@@ -19900,7 +19921,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The DOM tree as a element object. * The DOM tree as a element object.
*/ */
tree: function () { tree: function ()
{
return this.nodeTree; return this.nodeTree;
}, },
...@@ -19914,7 +19936,8 @@ Strophe.Builder.prototype = { ...@@ -19914,7 +19936,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The serialized DOM tree in a String. * The serialized DOM tree in a String.
*/ */
toString: function () { toString: function ()
{
return Strophe.serialize(this.nodeTree); return Strophe.serialize(this.nodeTree);
}, },
...@@ -19928,7 +19951,8 @@ Strophe.Builder.prototype = { ...@@ -19928,7 +19951,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Stophe.Builder object. * The Stophe.Builder object.
*/ */
up: function () { up: function ()
{
this.node = this.node.parentNode; this.node = this.node.parentNode;
return this; return this;
}, },
...@@ -19945,7 +19969,8 @@ Strophe.Builder.prototype = { ...@@ -19945,7 +19969,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Strophe.Builder object. * The Strophe.Builder object.
*/ */
attrs: function (moreattrs) { attrs: function (moreattrs)
{
for (var k in moreattrs) { for (var k in moreattrs) {
if (moreattrs.hasOwnProperty(k)) { if (moreattrs.hasOwnProperty(k)) {
if (moreattrs[k] === undefined) { if (moreattrs[k] === undefined) {
...@@ -19974,7 +19999,8 @@ Strophe.Builder.prototype = { ...@@ -19974,7 +19999,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Strophe.Builder object. * The Strophe.Builder object.
*/ */
c: function (name, attrs, text) { c: function (name, attrs, text)
{
var child = Strophe.xmlElement(name, attrs, text); var child = Strophe.xmlElement(name, attrs, text);
this.node.appendChild(child); this.node.appendChild(child);
if (typeof text !== "string") { if (typeof text !== "string") {
...@@ -19997,7 +20023,8 @@ Strophe.Builder.prototype = { ...@@ -19997,7 +20023,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Strophe.Builder object. * The Strophe.Builder object.
*/ */
cnode: function (elem) { cnode: function (elem)
{
var impNode; var impNode;
var xmlGen = Strophe.xmlGenerator(); var xmlGen = Strophe.xmlGenerator();
try { try {
...@@ -20026,7 +20053,8 @@ Strophe.Builder.prototype = { ...@@ -20026,7 +20053,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Strophe.Builder object. * The Strophe.Builder object.
*/ */
t: function (text) { t: function (text)
{
var child = Strophe.xmlTextNode(text); var child = Strophe.xmlTextNode(text);
this.node.appendChild(child); this.node.appendChild(child);
return this; return this;
...@@ -20043,7 +20071,8 @@ Strophe.Builder.prototype = { ...@@ -20043,7 +20071,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Strophe.Builder object. * The Strophe.Builder object.
*/ */
h: function (html) { h: function (html)
{
var fragment = document.createElement('body'); var fragment = document.createElement('body');
// force the browser to try and fix any invalid HTML tags // force the browser to try and fix any invalid HTML tags
...@@ -20088,7 +20117,8 @@ Strophe.Builder.prototype = { ...@@ -20088,7 +20117,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* A new Strophe.Handler object. * A new Strophe.Handler object.
*/ */
Strophe.Handler = function (handler, ns, name, type, id, from, options) { Strophe.Handler = function (handler, ns, name, type, id, from, options)
{
this.handler = handler; this.handler = handler;
this.ns = ns; this.ns = ns;
this.name = name; this.name = name;
...@@ -20121,7 +20151,8 @@ Strophe.Handler.prototype = { ...@@ -20121,7 +20151,8 @@ Strophe.Handler.prototype = {
* Returns: * Returns:
* true if the stanza matches and false otherwise. * true if the stanza matches and false otherwise.
*/ */
isMatch: function (elem) { isMatch: function (elem)
{
var nsMatch; var nsMatch;
var from = null; var from = null;
...@@ -20167,7 +20198,8 @@ Strophe.Handler.prototype = { ...@@ -20167,7 +20198,8 @@ Strophe.Handler.prototype = {
* Returns: * Returns:
* A boolean indicating if the handler should remain active. * A boolean indicating if the handler should remain active.
*/ */
run: function (elem) { run: function (elem)
{
var result = null; var result = null;
try { try {
result = this.handler(elem); result = this.handler(elem);
...@@ -20200,7 +20232,8 @@ Strophe.Handler.prototype = { ...@@ -20200,7 +20232,8 @@ Strophe.Handler.prototype = {
* Returns: * Returns:
* A String. * A String.
*/ */
toString: function () { toString: function ()
{
return "{Handler: " + this.handler + "(" + this.name + "," + return "{Handler: " + this.handler + "(" + this.name + "," +
this.id + "," + this.ns + ")}"; this.id + "," + this.ns + ")}";
} }
...@@ -20231,7 +20264,8 @@ Strophe.Handler.prototype = { ...@@ -20231,7 +20264,8 @@ Strophe.Handler.prototype = {
* Returns: * Returns:
* A new Strophe.TimedHandler object. * A new Strophe.TimedHandler object.
*/ */
Strophe.TimedHandler = function (period, handler) { Strophe.TimedHandler = function (period, handler)
{
this.period = period; this.period = period;
this.handler = handler; this.handler = handler;
...@@ -20247,7 +20281,8 @@ Strophe.TimedHandler.prototype = { ...@@ -20247,7 +20281,8 @@ Strophe.TimedHandler.prototype = {
* true if the Strophe.TimedHandler should be called again, and false * true if the Strophe.TimedHandler should be called again, and false
* otherwise. * otherwise.
*/ */
run: function () { run: function ()
{
this.lastCalled = new Date().getTime(); this.lastCalled = new Date().getTime();
return this.handler(); return this.handler();
}, },
...@@ -20255,7 +20290,8 @@ Strophe.TimedHandler.prototype = { ...@@ -20255,7 +20290,8 @@ Strophe.TimedHandler.prototype = {
/** PrivateFunction: reset /** PrivateFunction: reset
* Reset the last called time for the Strophe.TimedHandler. * Reset the last called time for the Strophe.TimedHandler.
*/ */
reset: function () { reset: function ()
{
this.lastCalled = new Date().getTime(); this.lastCalled = new Date().getTime();
}, },
...@@ -20265,7 +20301,8 @@ Strophe.TimedHandler.prototype = { ...@@ -20265,7 +20301,8 @@ Strophe.TimedHandler.prototype = {
* Returns: * Returns:
* The string representation. * The string representation.
*/ */
toString: function () { toString: function ()
{
return "{TimedHandler: " + this.handler + "(" + this.period +")}"; return "{TimedHandler: " + this.handler + "(" + this.period +")}";
} }
}; };
...@@ -20312,8 +20349,13 @@ Strophe.TimedHandler.prototype = { ...@@ -20312,8 +20349,13 @@ Strophe.TimedHandler.prototype = {
* document. These cookies will then be included in the BOSH XMLHttpRequest * document. These cookies will then be included in the BOSH XMLHttpRequest
* or in the websocket connection. * or in the websocket connection.
* *
* The passed in value must be a map of cookie names and string values: * The passed in value must be a map of cookie names and string values or
* cookie attributes.
* *
* For example:
* { "myCookie": "1234" }
*
* or:
* { "myCookie": { * { "myCookie": {
* "value": "1234", * "value": "1234",
* "domain": ".example.org", * "domain": ".example.org",
...@@ -20373,7 +20415,7 @@ Strophe.TimedHandler.prototype = { ...@@ -20373,7 +20415,7 @@ Strophe.TimedHandler.prototype = {
* and for some reason need to send cookies to it. * and for some reason need to send cookies to it.
* In order for this to work cross-domain, the server must also enable * In order for this to work cross-domain, the server must also enable
* credentials by setting the Access-Control-Allow-Credentials response header * credentials by setting the Access-Control-Allow-Credentials response header
* to "true". For most usecases however this setting should be false (which * to “true”. For most usecases however this setting should be false (which
* is the default). * is the default).
* Additionally, when using Access-Control-Allow-Credentials, the * Additionally, when using Access-Control-Allow-Credentials, the
* Access-Control-Allow-Origin header can't be set to the wildcard "*", but * Access-Control-Allow-Origin header can't be set to the wildcard "*", but
...@@ -20386,7 +20428,8 @@ Strophe.TimedHandler.prototype = { ...@@ -20386,7 +20428,8 @@ Strophe.TimedHandler.prototype = {
* Returns: * Returns:
* A new Strophe.Connection object. * A new Strophe.Connection object.
*/ */
Strophe.Connection = function (service, options) { Strophe.Connection = function (service, options)
{
// The service URL // The service URL
this.service = service; this.service = service;
// Configuration options // Configuration options
...@@ -20443,10 +20486,7 @@ Strophe.Connection = function (service, options) { ...@@ -20443,10 +20486,7 @@ Strophe.Connection = function (service, options) {
this.maxRetries = 5; this.maxRetries = 5;
// Call onIdle callback every 1/10th of a second // Call onIdle callback every 1/10th of a second
// XXX: setTimeout should be called only with function expressions (23974bc1) this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
this._idleTimeout = setTimeout(function() {
this._onIdle();
}.bind(this), 100);
utils.addCookies(this.options.cookies); utils.addCookies(this.options.cookies);
...@@ -20470,7 +20510,8 @@ Strophe.Connection.prototype = { ...@@ -20470,7 +20510,8 @@ Strophe.Connection.prototype = {
* This function should be called after a connection is disconnected * This function should be called after a connection is disconnected
* before that connection is reused. * before that connection is reused.
*/ */
reset: function () { reset: function ()
{
this._proto._reset(); this._proto._reset();
// SASL // SASL
...@@ -20505,7 +20546,8 @@ Strophe.Connection.prototype = { ...@@ -20505,7 +20546,8 @@ Strophe.Connection.prototype = {
* This causes Strophe to send the data in a single request, saving * This causes Strophe to send the data in a single request, saving
* many request trips. * many request trips.
*/ */
pause: function () { pause: function ()
{
this.paused = true; this.paused = true;
}, },
...@@ -20514,7 +20556,8 @@ Strophe.Connection.prototype = { ...@@ -20514,7 +20556,8 @@ Strophe.Connection.prototype = {
* *
* This resumes after pause() has been called. * This resumes after pause() has been called.
*/ */
resume: function () { resume: function ()
{
this.paused = false; this.paused = false;
}, },
...@@ -20584,7 +20627,8 @@ Strophe.Connection.prototype = { ...@@ -20584,7 +20627,8 @@ Strophe.Connection.prototype = {
* (String) authcid - The optional alternative authentication identity * (String) authcid - The optional alternative authentication identity
* (username) if intending to impersonate another user. * (username) if intending to impersonate another user.
*/ */
connect: function (jid, pass, callback, wait, hold, route, authcid) { connect: function (jid, pass, callback, wait, hold, route, authcid)
{
this.jid = jid; this.jid = jid;
/** Variable: authzid /** Variable: authzid
* Authorization identity. * Authorization identity.
...@@ -20640,7 +20684,8 @@ Strophe.Connection.prototype = { ...@@ -20640,7 +20684,8 @@ Strophe.Connection.prototype = {
* (Integer) wind - The optional HTTBIND window value. This is the * (Integer) wind - The optional HTTBIND window value. This is the
* allowed range of request ids that are valid. The default is 5. * allowed range of request ids that are valid. The default is 5.
*/ */
attach: function (jid, sid, rid, callback, wait, hold, wind) { attach: function (jid, sid, rid, callback, wait, hold, wind)
{
if (this._proto instanceof Strophe.Bosh) { if (this._proto instanceof Strophe.Bosh) {
this._proto._attach(jid, sid, rid, callback, wait, hold, wind); this._proto._attach(jid, sid, rid, callback, wait, hold, wind);
} else { } else {
...@@ -20678,7 +20723,8 @@ Strophe.Connection.prototype = { ...@@ -20678,7 +20723,8 @@ Strophe.Connection.prototype = {
* (Integer) wind - The optional HTTBIND window value. This is the * (Integer) wind - The optional HTTBIND window value. This is the
* allowed range of request ids that are valid. The default is 5. * allowed range of request ids that are valid. The default is 5.
*/ */
restore: function (jid, callback, wait, hold, wind) { restore: function (jid, callback, wait, hold, wind)
{
if (this._sessionCachingSupported()) { if (this._sessionCachingSupported()) {
this._proto._restore(jid, callback, wait, hold, wind); this._proto._restore(jid, callback, wait, hold, wind);
} else { } else {
...@@ -20693,7 +20739,8 @@ Strophe.Connection.prototype = { ...@@ -20693,7 +20739,8 @@ Strophe.Connection.prototype = {
* Checks whether sessionStorage and JSON are supported and whether we're * Checks whether sessionStorage and JSON are supported and whether we're
* using BOSH. * using BOSH.
*/ */
_sessionCachingSupported: function () { _sessionCachingSupported: function ()
{
if (this._proto instanceof Strophe.Bosh) { if (this._proto instanceof Strophe.Bosh) {
if (!JSON) { return false; } if (!JSON) { return false; }
try { try {
...@@ -20726,7 +20773,8 @@ Strophe.Connection.prototype = { ...@@ -20726,7 +20773,8 @@ Strophe.Connection.prototype = {
* (XMLElement) elem - The XML data received by the connection. * (XMLElement) elem - The XML data received by the connection.
*/ */
/* jshint unused:false */ /* jshint unused:false */
xmlInput: function (elem) { xmlInput: function (elem)
{
return; return;
}, },
/* jshint unused:true */ /* jshint unused:true */
...@@ -20750,7 +20798,8 @@ Strophe.Connection.prototype = { ...@@ -20750,7 +20798,8 @@ Strophe.Connection.prototype = {
* (XMLElement) elem - The XMLdata sent by the connection. * (XMLElement) elem - The XMLdata sent by the connection.
*/ */
/* jshint unused:false */ /* jshint unused:false */
xmlOutput: function (elem) { xmlOutput: function (elem)
{
return; return;
}, },
/* jshint unused:true */ /* jshint unused:true */
...@@ -20768,7 +20817,8 @@ Strophe.Connection.prototype = { ...@@ -20768,7 +20817,8 @@ Strophe.Connection.prototype = {
* (String) data - The data received by the connection. * (String) data - The data received by the connection.
*/ */
/* jshint unused:false */ /* jshint unused:false */
rawInput: function (data) { rawInput: function (data)
{
return; return;
}, },
/* jshint unused:true */ /* jshint unused:true */
...@@ -20786,7 +20836,8 @@ Strophe.Connection.prototype = { ...@@ -20786,7 +20836,8 @@ Strophe.Connection.prototype = {
* (String) data - The data sent by the connection. * (String) data - The data sent by the connection.
*/ */
/* jshint unused:false */ /* jshint unused:false */
rawOutput: function (data) { rawOutput: function (data)
{
return; return;
}, },
/* jshint unused:true */ /* jshint unused:true */
...@@ -20803,7 +20854,8 @@ Strophe.Connection.prototype = { ...@@ -20803,7 +20854,8 @@ Strophe.Connection.prototype = {
* (Number) rid - The next valid rid * (Number) rid - The next valid rid
*/ */
/* jshint unused:false */ /* jshint unused:false */
nextValidRid: function (rid) { nextValidRid: function (rid)
{
return; return;
}, },
/* jshint unused:true */ /* jshint unused:true */
...@@ -20820,7 +20872,8 @@ Strophe.Connection.prototype = { ...@@ -20820,7 +20872,8 @@ Strophe.Connection.prototype = {
* [XMLElement] | * [XMLElement] |
* Strophe.Builder) elem - The stanza to send. * Strophe.Builder) elem - The stanza to send.
*/ */
send: function (elem) { send: function (elem)
{
if (elem === null) { return ; } if (elem === null) { return ; }
if (typeof(elem.sort) === "function") { if (typeof(elem.sort) === "function") {
for (var i = 0; i < elem.length; i++) { for (var i = 0; i < elem.length; i++) {
...@@ -20843,7 +20896,8 @@ Strophe.Connection.prototype = { ...@@ -20843,7 +20896,8 @@ Strophe.Connection.prototype = {
* several send()s are called in succession. flush() can be used to * several send()s are called in succession. flush() can be used to
* immediately send all pending data. * immediately send all pending data.
*/ */
flush: function () { flush: function ()
{
// cancel the pending idle period and run the idle function // cancel the pending idle period and run the idle function
// immediately // immediately
clearTimeout(this._idleTimeout); clearTimeout(this._idleTimeout);
...@@ -20959,15 +21013,13 @@ Strophe.Connection.prototype = { ...@@ -20959,15 +21013,13 @@ Strophe.Connection.prototype = {
/** PrivateFunction: _sendRestart /** PrivateFunction: _sendRestart
* Send an xmpp:restart stanza. * Send an xmpp:restart stanza.
*/ */
_sendRestart: function () { _sendRestart: function ()
{
this._data.push("restart"); this._data.push("restart");
this._proto._sendRestart(); this._proto._sendRestart();
// XXX: setTimeout should be called only with function expressions (23974bc1) this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
this._idleTimeout = setTimeout(function() {
this._onIdle();
}.bind(this), 100);
}, },
/** Function: addTimedHandler /** Function: addTimedHandler
...@@ -20992,7 +21044,8 @@ Strophe.Connection.prototype = { ...@@ -20992,7 +21044,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* A reference to the handler that can be used to remove it. * A reference to the handler that can be used to remove it.
*/ */
addTimedHandler: function (period, handler) { addTimedHandler: function (period, handler)
{
var thand = new Strophe.TimedHandler(period, handler); var thand = new Strophe.TimedHandler(period, handler);
this.addTimeds.push(thand); this.addTimeds.push(thand);
return thand; return thand;
...@@ -21008,7 +21061,8 @@ Strophe.Connection.prototype = { ...@@ -21008,7 +21061,8 @@ Strophe.Connection.prototype = {
* Parameters: * Parameters:
* (Strophe.TimedHandler) handRef - The handler reference. * (Strophe.TimedHandler) handRef - The handler reference.
*/ */
deleteTimedHandler: function (handRef) { deleteTimedHandler: function (handRef)
{
// this must be done in the Idle loop so that we don't change // this must be done in the Idle loop so that we don't change
// the handlers during iteration // the handlers during iteration
this.removeTimeds.push(handRef); this.removeTimeds.push(handRef);
...@@ -21052,7 +21106,8 @@ Strophe.Connection.prototype = { ...@@ -21052,7 +21106,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* A reference to the handler that can be used to remove it. * A reference to the handler that can be used to remove it.
*/ */
addHandler: function (handler, ns, name, type, id, from, options) { addHandler: function (handler, ns, name, type, id, from, options)
{
var hand = new Strophe.Handler(handler, ns, name, type, id, from, options); var hand = new Strophe.Handler(handler, ns, name, type, id, from, options);
this.addHandlers.push(hand); this.addHandlers.push(hand);
return hand; return hand;
...@@ -21068,7 +21123,8 @@ Strophe.Connection.prototype = { ...@@ -21068,7 +21123,8 @@ Strophe.Connection.prototype = {
* Parameters: * Parameters:
* (Strophe.Handler) handRef - The handler reference. * (Strophe.Handler) handRef - The handler reference.
*/ */
deleteHandler: function (handRef) { deleteHandler: function (handRef)
{
// this must be done in the Idle loop so that we don't change // this must be done in the Idle loop so that we don't change
// the handlers during iteration // the handlers during iteration
this.removeHandlers.push(handRef); this.removeHandlers.push(handRef);
...@@ -21096,7 +21152,8 @@ Strophe.Connection.prototype = { ...@@ -21096,7 +21152,8 @@ Strophe.Connection.prototype = {
* Parameters: * Parameters:
* (String) reason - The reason the disconnect is occuring. * (String) reason - The reason the disconnect is occuring.
*/ */
disconnect: function (reason) { disconnect: function (reason)
{
this._changeConnectStatus(Strophe.Status.DISCONNECTING, reason); this._changeConnectStatus(Strophe.Status.DISCONNECTING, reason);
Strophe.info("Disconnect was called because: " + reason); Strophe.info("Disconnect was called because: " + reason);
...@@ -21128,7 +21185,8 @@ Strophe.Connection.prototype = { ...@@ -21128,7 +21185,8 @@ Strophe.Connection.prototype = {
* in Strophe.Status * in Strophe.Status
* (String) condition - the error condition or null * (String) condition - the error condition or null
*/ */
_changeConnectStatus: function (status, condition) { _changeConnectStatus: function (status, condition)
{
// notify all plugins listening for status changes // notify all plugins listening for status changes
for (var k in Strophe._connectionPlugins) { for (var k in Strophe._connectionPlugins) {
if (Strophe._connectionPlugins.hasOwnProperty(k)) { if (Strophe._connectionPlugins.hasOwnProperty(k)) {
...@@ -21161,7 +21219,8 @@ Strophe.Connection.prototype = { ...@@ -21161,7 +21219,8 @@ Strophe.Connection.prototype = {
* This is the last piece of the disconnection logic. This resets the * This is the last piece of the disconnection logic. This resets the
* connection and alerts the user's connection callback. * connection and alerts the user's connection callback.
*/ */
_doDisconnect: function (condition) { _doDisconnect: function (condition)
{
if (typeof this._idleTimeout == "number") { if (typeof this._idleTimeout == "number") {
clearTimeout(this._idleTimeout); clearTimeout(this._idleTimeout);
} }
...@@ -21204,7 +21263,8 @@ Strophe.Connection.prototype = { ...@@ -21204,7 +21263,8 @@ Strophe.Connection.prototype = {
* (Strophe.Request) req - The request that has data ready. * (Strophe.Request) req - The request that has data ready.
* (string) req - The stanza a raw string (optiona). * (string) req - The stanza a raw string (optiona).
*/ */
_dataRecv: function (req, raw) { _dataRecv: function (req, raw)
{
Strophe.info("_dataRecv called"); Strophe.info("_dataRecv called");
var elem = this._proto._reqToData(req); var elem = this._proto._reqToData(req);
if (elem === null) { return; } if (elem === null) { return; }
...@@ -21318,7 +21378,8 @@ Strophe.Connection.prototype = { ...@@ -21318,7 +21378,8 @@ Strophe.Connection.prototype = {
* Useful for plugins with their own xmpp connect callback (when their) * Useful for plugins with their own xmpp connect callback (when their)
* want to do something special). * want to do something special).
*/ */
_connect_cb: function (req, _callback, raw) { _connect_cb: function (req, _callback, raw)
{
Strophe.info("_connect_cb was called"); Strophe.info("_connect_cb was called");
this.connected = true; this.connected = true;
...@@ -21402,7 +21463,8 @@ Strophe.Connection.prototype = { ...@@ -21402,7 +21463,8 @@ Strophe.Connection.prototype = {
* the code will fall back to legacy authentication. * the code will fall back to legacy authentication.
* *
*/ */
authenticate: function (matched) { authenticate: function (matched)
{
var i; var i;
// Sorting matched mechanisms according to priority. // Sorting matched mechanisms according to priority.
for (i = 0; i < matched.length - 1; ++i) { for (i = 0; i < matched.length - 1; ++i) {
...@@ -21508,7 +21570,8 @@ Strophe.Connection.prototype = { ...@@ -21508,7 +21570,8 @@ Strophe.Connection.prototype = {
* false to remove the handler. * false to remove the handler.
*/ */
/* jshint unused:false */ /* jshint unused:false */
_auth1_cb: function (elem) { _auth1_cb: function (elem)
{
// build plaintext auth iq // build plaintext auth iq
var iq = $iq({type: "set", id: "_auth_2"}) var iq = $iq({type: "set", id: "_auth_2"})
.c('query', {xmlns: Strophe.NS.AUTH}) .c('query', {xmlns: Strophe.NS.AUTH})
...@@ -21542,7 +21605,8 @@ Strophe.Connection.prototype = { ...@@ -21542,7 +21605,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* false to remove the handler. * false to remove the handler.
*/ */
_sasl_success_cb: function (elem) { _sasl_success_cb: function (elem)
{
if (this._sasl_data["server-signature"]) { if (this._sasl_data["server-signature"]) {
var serverSignature; var serverSignature;
var success = Base64.decode(Strophe.getText(elem)); var success = Base64.decode(Strophe.getText(elem));
...@@ -21609,7 +21673,8 @@ Strophe.Connection.prototype = { ...@@ -21609,7 +21673,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* false to remove the handler. * false to remove the handler.
*/ */
_sasl_auth1_cb: function (elem) { _sasl_auth1_cb: function (elem)
{
// save stream:features for future usage // save stream:features for future usage
this.features = elem; this.features = elem;
...@@ -21644,6 +21709,7 @@ Strophe.Connection.prototype = { ...@@ -21644,6 +21709,7 @@ Strophe.Connection.prototype = {
.tree()); .tree());
} }
} }
return false; return false;
}, },
...@@ -21656,7 +21722,8 @@ Strophe.Connection.prototype = { ...@@ -21656,7 +21722,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* false to remove the handler. * false to remove the handler.
*/ */
_sasl_bind_cb: function (elem) { _sasl_bind_cb: function (elem)
{
if (elem.getAttribute("type") == "error") { if (elem.getAttribute("type") == "error") {
Strophe.info("SASL binding failed."); Strophe.info("SASL binding failed.");
var conflict = elem.getElementsByTagName("conflict"), condition; var conflict = elem.getElementsByTagName("conflict"), condition;
...@@ -21707,7 +21774,8 @@ Strophe.Connection.prototype = { ...@@ -21707,7 +21774,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* false to remove the handler. * false to remove the handler.
*/ */
_sasl_session_cb: function (elem) { _sasl_session_cb: function (elem)
{
if (elem.getAttribute("type") == "result") { if (elem.getAttribute("type") == "result") {
this.authenticated = true; this.authenticated = true;
this._changeConnectStatus(Strophe.Status.CONNECTED, null); this._changeConnectStatus(Strophe.Status.CONNECTED, null);
...@@ -21716,6 +21784,7 @@ Strophe.Connection.prototype = { ...@@ -21716,6 +21784,7 @@ Strophe.Connection.prototype = {
this._changeConnectStatus(Strophe.Status.AUTHFAIL, null); this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
return false; return false;
} }
return false; return false;
}, },
...@@ -21729,7 +21798,8 @@ Strophe.Connection.prototype = { ...@@ -21729,7 +21798,8 @@ Strophe.Connection.prototype = {
* false to remove the handler. * false to remove the handler.
*/ */
/* jshint unused:false */ /* jshint unused:false */
_sasl_failure_cb: function (elem) { _sasl_failure_cb: function (elem)
{
// delete unneeded handlers // delete unneeded handlers
if (this._sasl_success_handler) { if (this._sasl_success_handler) {
this.deleteHandler(this._sasl_success_handler); this.deleteHandler(this._sasl_success_handler);
...@@ -21759,7 +21829,8 @@ Strophe.Connection.prototype = { ...@@ -21759,7 +21829,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* false to remove the handler. * false to remove the handler.
*/ */
_auth2_cb: function (elem) { _auth2_cb: function (elem)
{
if (elem.getAttribute("type") == "result") { if (elem.getAttribute("type") == "result") {
this.authenticated = true; this.authenticated = true;
this._changeConnectStatus(Strophe.Status.CONNECTED, null); this._changeConnectStatus(Strophe.Status.CONNECTED, null);
...@@ -21767,6 +21838,7 @@ Strophe.Connection.prototype = { ...@@ -21767,6 +21838,7 @@ Strophe.Connection.prototype = {
this._changeConnectStatus(Strophe.Status.AUTHFAIL, null); this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
this.disconnect('authentication failed'); this.disconnect('authentication failed');
} }
return false; return false;
}, },
...@@ -21781,7 +21853,8 @@ Strophe.Connection.prototype = { ...@@ -21781,7 +21853,8 @@ Strophe.Connection.prototype = {
* (Integer) period - The period of the handler. * (Integer) period - The period of the handler.
* (Function) handler - The callback function. * (Function) handler - The callback function.
*/ */
_addSysTimedHandler: function (period, handler) { _addSysTimedHandler: function (period, handler)
{
var thand = new Strophe.TimedHandler(period, handler); var thand = new Strophe.TimedHandler(period, handler);
thand.user = false; thand.user = false;
this.addTimeds.push(thand); this.addTimeds.push(thand);
...@@ -21823,8 +21896,6 @@ Strophe.Connection.prototype = { ...@@ -21823,8 +21896,6 @@ Strophe.Connection.prototype = {
{ {
Strophe.info("_onDisconnectTimeout was called"); Strophe.info("_onDisconnectTimeout was called");
this._changeConnectStatus(Strophe.Status.CONNTIMEOUT, null);
this._proto._onDisconnectTimeout(); this._proto._onDisconnectTimeout();
// actually disconnect // actually disconnect
...@@ -21883,10 +21954,7 @@ Strophe.Connection.prototype = { ...@@ -21883,10 +21954,7 @@ Strophe.Connection.prototype = {
// reactivate the timer only if connected // reactivate the timer only if connected
if (this.connected) { if (this.connected) {
// XXX: setTimeout should be called only with function expressions (23974bc1) this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
this._idleTimeout = setTimeout(function() {
this._onIdle();
}.bind(this), 100);
} }
} }
}; };
...@@ -21978,7 +22046,8 @@ Strophe.SASLMechanism.prototype = { ...@@ -21978,7 +22046,8 @@ Strophe.SASLMechanism.prototype = {
* Parameters: * Parameters:
* (Strophe.Connection) connection - Target Connection. * (Strophe.Connection) connection - Target Connection.
*/ */
onStart: function(connection) { onStart: function(connection)
{
this._connection = connection; this._connection = connection;
}, },
...@@ -22021,7 +22090,6 @@ Strophe.SASLMechanism.prototype = { ...@@ -22021,7 +22090,6 @@ Strophe.SASLMechanism.prototype = {
* Strophe.SASLPlain - SASL Plain authentication. * Strophe.SASLPlain - SASL Plain authentication.
* Strophe.SASLMD5 - SASL Digest-MD5 authentication * Strophe.SASLMD5 - SASL Digest-MD5 authentication
* Strophe.SASLSHA1 - SASL SCRAM-SHA1 authentication * Strophe.SASLSHA1 - SASL SCRAM-SHA1 authentication
* Strophe.SASLOAuthBearer - SASL OAuth Bearer authentication
*/ */
// Building SASL callbacks // Building SASL callbacks
...@@ -22236,32 +22304,6 @@ Strophe.SASLMD5.prototype.onChallenge = function(connection, challenge, test_cno ...@@ -22236,32 +22304,6 @@ Strophe.SASLMD5.prototype.onChallenge = function(connection, challenge, test_cno
Strophe.Connection.prototype.mechanisms[Strophe.SASLMD5.prototype.name] = Strophe.SASLMD5; Strophe.Connection.prototype.mechanisms[Strophe.SASLMD5.prototype.name] = Strophe.SASLMD5;
/** PrivateConstructor: SASLOAuthBearer
* SASL OAuth Bearer authentication.
*/
Strophe.SASLOAuthBearer = function() {};
Strophe.SASLOAuthBearer.prototype = new Strophe.SASLMechanism("OAUTHBEARER", true, 80);
Strophe.SASLOAuthBearer.test = function(connection) {
return connection.authcid !== null;
};
Strophe.SASLOAuthBearer.prototype.onChallenge = function(connection) {
var auth_str = 'n,a=';
auth_str = auth_str + connection.authzid;
auth_str = auth_str + ','
auth_str = auth_str + "\u0001";
auth_str = auth_str + 'auth=Bearer ';
auth_str = auth_str + connection.pass;
auth_str = auth_str + "\u0001";
auth_str = auth_str + "\u0001";
return utils.utf16to8(auth_str);
};
Strophe.Connection.prototype.mechanisms[Strophe.SASLOAuthBearer.prototype.name] = Strophe.SASLOAuthBearer;
return { return {
Strophe: Strophe, Strophe: Strophe,
$build: $build, $build: $build,
...@@ -22317,7 +22359,8 @@ return { ...@@ -22317,7 +22359,8 @@ return {
* (Integer) sends - The number of times this same request has been * (Integer) sends - The number of times this same request has been
* sent. * sent.
*/ */
Strophe.Request = function (elem, func, rid, sends) { Strophe.Request = function (elem, func, rid, sends)
{
this.id = ++Strophe._requestId; this.id = ++Strophe._requestId;
this.xmlData = elem; this.xmlData = elem;
this.data = Strophe.serialize(elem); this.data = Strophe.serialize(elem);
...@@ -22358,7 +22401,8 @@ Strophe.Request.prototype = { ...@@ -22358,7 +22401,8 @@ Strophe.Request.prototype = {
* Returns: * Returns:
* The DOM element tree of the response. * The DOM element tree of the response.
*/ */
getResponse: function () { getResponse: function ()
{
var node = null; var node = null;
if (this.xhr.responseXML && this.xhr.responseXML.documentElement) { if (this.xhr.responseXML && this.xhr.responseXML.documentElement) {
node = this.xhr.responseXML.documentElement; node = this.xhr.responseXML.documentElement;
...@@ -22386,7 +22430,8 @@ Strophe.Request.prototype = { ...@@ -22386,7 +22430,8 @@ Strophe.Request.prototype = {
* Returns: * Returns:
* A new XMLHttpRequest. * A new XMLHttpRequest.
*/ */
_newXHR: function () { _newXHR: function ()
{
var xhr = null; var xhr = null;
if (window.XMLHttpRequest) { if (window.XMLHttpRequest) {
xhr = new XMLHttpRequest(); xhr = new XMLHttpRequest();
...@@ -22462,7 +22507,8 @@ Strophe.Bosh.prototype = { ...@@ -22462,7 +22507,8 @@ Strophe.Bosh.prototype = {
* Returns: * Returns:
* A Strophe.Builder with a <body/> element. * A Strophe.Builder with a <body/> element.
*/ */
_buildBody: function () { _buildBody: function ()
{
var bodyWrap = $build('body', { var bodyWrap = $build('body', {
rid: this.rid++, rid: this.rid++,
xmlns: Strophe.NS.HTTPBIND xmlns: Strophe.NS.HTTPBIND
...@@ -22470,7 +22516,7 @@ Strophe.Bosh.prototype = { ...@@ -22470,7 +22516,7 @@ Strophe.Bosh.prototype = {
if (this.sid !== null) { if (this.sid !== null) {
bodyWrap.attrs({sid: this.sid}); bodyWrap.attrs({sid: this.sid});
} }
if (this._conn.options.keepalive && this._conn._sessionCachingSupported()) { if (this._conn.options.keepalive) {
this._cacheSession(); this._cacheSession();
} }
return bodyWrap; return bodyWrap;
...@@ -22481,13 +22527,12 @@ Strophe.Bosh.prototype = { ...@@ -22481,13 +22527,12 @@ Strophe.Bosh.prototype = {
* *
* This function is called by the reset function of the Strophe Connection * This function is called by the reset function of the Strophe Connection
*/ */
_reset: function () { _reset: function ()
{
this.rid = Math.floor(Math.random() * 4294967295); this.rid = Math.floor(Math.random() * 4294967295);
this.sid = null; this.sid = null;
this.errors = 0; this.errors = 0;
if (this._conn._sessionCachingSupported()) { window.sessionStorage.removeItem('strophe-bosh-session');
window.sessionStorage.removeItem('strophe-bosh-session');
}
this._conn.nextValidRid(this.rid); this._conn.nextValidRid(this.rid);
}, },
...@@ -22497,7 +22542,8 @@ Strophe.Bosh.prototype = { ...@@ -22497,7 +22542,8 @@ Strophe.Bosh.prototype = {
* *
* Creates and sends the Request that initializes the BOSH connection. * Creates and sends the Request that initializes the BOSH connection.
*/ */
_connect: function (wait, hold, route) { _connect: function (wait, hold, route)
{
this.wait = wait || this.wait; this.wait = wait || this.wait;
this.hold = hold || this.hold; this.hold = hold || this.hold;
this.errors = 0; this.errors = 0;
...@@ -22554,7 +22600,8 @@ Strophe.Bosh.prototype = { ...@@ -22554,7 +22600,8 @@ Strophe.Bosh.prototype = {
* (Integer) wind - The optional HTTBIND window value. This is the * (Integer) wind - The optional HTTBIND window value. This is the
* allowed range of request ids that are valid. The default is 5. * allowed range of request ids that are valid. The default is 5.
*/ */
_attach: function (jid, sid, rid, callback, wait, hold, wind) { _attach: function (jid, sid, rid, callback, wait, hold, wind)
{
this._conn.jid = jid; this._conn.jid = jid;
this.sid = sid; this.sid = sid;
this.rid = rid; this.rid = rid;
...@@ -22592,14 +22639,15 @@ Strophe.Bosh.prototype = { ...@@ -22592,14 +22639,15 @@ Strophe.Bosh.prototype = {
* (Integer) wind - The optional HTTBIND window value. This is the * (Integer) wind - The optional HTTBIND window value. This is the
* allowed range of request ids that are valid. The default is 5. * allowed range of request ids that are valid. The default is 5.
*/ */
_restore: function (jid, callback, wait, hold, wind) { _restore: function (jid, callback, wait, hold, wind)
{
var session = JSON.parse(window.sessionStorage.getItem('strophe-bosh-session')); var session = JSON.parse(window.sessionStorage.getItem('strophe-bosh-session'));
if (typeof session !== "undefined" && if (typeof session !== "undefined" &&
session !== null && session !== null &&
session.rid && session.rid &&
session.sid && session.sid &&
session.jid && session.jid &&
(typeof jid === "undefined" || jid === null || Strophe.getBareJidFromJid(session.jid) == Strophe.getBareJidFromJid(jid))) (typeof jid === "undefined" || jid === "null" || Strophe.getBareJidFromJid(session.jid) == Strophe.getBareJidFromJid(jid)))
{ {
this._conn.restored = true; this._conn.restored = true;
this._attach(session.jid, session.sid, session.rid, callback, wait, hold, wind); this._attach(session.jid, session.sid, session.rid, callback, wait, hold, wind);
...@@ -22615,7 +22663,8 @@ Strophe.Bosh.prototype = { ...@@ -22615,7 +22663,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Strophe.Request) bodyWrap - The received stanza. * (Strophe.Request) bodyWrap - The received stanza.
*/ */
_cacheSession: function () { _cacheSession: function ()
{
if (this._conn.authenticated) { if (this._conn.authenticated) {
if (this._conn.jid && this.rid && this.sid) { if (this._conn.jid && this.rid && this.sid) {
window.sessionStorage.setItem('strophe-bosh-session', JSON.stringify({ window.sessionStorage.setItem('strophe-bosh-session', JSON.stringify({
...@@ -22636,7 +22685,8 @@ Strophe.Bosh.prototype = { ...@@ -22636,7 +22685,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Strophe.Request) bodyWrap - The received stanza. * (Strophe.Request) bodyWrap - The received stanza.
*/ */
_connect_cb: function (bodyWrap) { _connect_cb: function (bodyWrap)
{
var typ = bodyWrap.getAttribute("type"); var typ = bodyWrap.getAttribute("type");
var cond, conflict; var cond, conflict;
if (typ !== null && typ == "terminate") { if (typ !== null && typ == "terminate") {
...@@ -22675,7 +22725,8 @@ Strophe.Bosh.prototype = { ...@@ -22675,7 +22725,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Request) pres - This stanza will be sent before disconnecting. * (Request) pres - This stanza will be sent before disconnecting.
*/ */
_disconnect: function (pres) { _disconnect: function (pres)
{
this._sendTerminate(pres); this._sendTerminate(pres);
}, },
...@@ -22684,12 +22735,11 @@ Strophe.Bosh.prototype = { ...@@ -22684,12 +22735,11 @@ Strophe.Bosh.prototype = {
* *
* Resets the SID and RID. * Resets the SID and RID.
*/ */
_doDisconnect: function () { _doDisconnect: function ()
{
this.sid = null; this.sid = null;
this.rid = Math.floor(Math.random() * 4294967295); this.rid = Math.floor(Math.random() * 4294967295);
if (this._conn._sessionCachingSupported()) { window.sessionStorage.removeItem('strophe-bosh-session');
window.sessionStorage.removeItem('strophe-bosh-session');
}
this._conn.nextValidRid(this.rid); this._conn.nextValidRid(this.rid);
}, },
...@@ -22700,7 +22750,8 @@ Strophe.Bosh.prototype = { ...@@ -22700,7 +22750,8 @@ Strophe.Bosh.prototype = {
* Returns: * Returns:
* True, if there are no Requests queued, False otherwise. * True, if there are no Requests queued, False otherwise.
*/ */
_emptyQueue: function () { _emptyQueue: function ()
{
return this._requests.length === 0; return this._requests.length === 0;
}, },
...@@ -22714,7 +22765,8 @@ Strophe.Bosh.prototype = { ...@@ -22714,7 +22765,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Integer) reqStatus - The request status. * (Integer) reqStatus - The request status.
*/ */
_hitError: function (reqStatus) { _hitError: function (reqStatus)
{
this.errors++; this.errors++;
Strophe.warn("request errored, status: " + reqStatus + Strophe.warn("request errored, status: " + reqStatus +
", number of errors: " + this.errors); ", number of errors: " + this.errors);
...@@ -22728,7 +22780,8 @@ Strophe.Bosh.prototype = { ...@@ -22728,7 +22780,8 @@ Strophe.Bosh.prototype = {
* Called on stream start/restart when no stream:features * Called on stream start/restart when no stream:features
* has been received and sends a blank poll request. * has been received and sends a blank poll request.
*/ */
_no_auth_received: function (_callback) { _no_auth_received: function (_callback)
{
if (_callback) { if (_callback) {
_callback = _callback.bind(this._conn); _callback = _callback.bind(this._conn);
} else { } else {
...@@ -22844,7 +22897,8 @@ Strophe.Bosh.prototype = { ...@@ -22844,7 +22897,8 @@ Strophe.Bosh.prototype = {
* (Function) func - The handler for the request. * (Function) func - The handler for the request.
* (Strophe.Request) req - The request that is changing readyState. * (Strophe.Request) req - The request that is changing readyState.
*/ */
_onRequestStateChange: function (func, req) { _onRequestStateChange: function (func, req)
{
Strophe.debug("request id " + req.id + Strophe.debug("request id " + req.id +
"." + req.sends + " state changed to " + "." + req.sends + " state changed to " +
req.xhr.readyState); req.xhr.readyState);
...@@ -22939,7 +22993,8 @@ Strophe.Bosh.prototype = { ...@@ -22939,7 +22993,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Integer) i - The index of the request in the queue. * (Integer) i - The index of the request in the queue.
*/ */
_processRequest: function (i) { _processRequest: function (i)
{
var self = this; var self = this;
var req = this._requests[i]; var req = this._requests[i];
var reqStatus = -1; var reqStatus = -1;
...@@ -23031,11 +23086,7 @@ Strophe.Bosh.prototype = { ...@@ -23031,11 +23086,7 @@ Strophe.Bosh.prototype = {
// expanding retry window // expanding retry window
var backoff = Math.min(Math.floor(Strophe.TIMEOUT * this.wait), var backoff = Math.min(Math.floor(Strophe.TIMEOUT * this.wait),
Math.pow(req.sends, 3)) * 1000; Math.pow(req.sends, 3)) * 1000;
setTimeout(sendFunc, backoff);
// XXX: setTimeout should be called only with function expressions (23974bc1)
setTimeout(function() {
sendFunc();
}, backoff);
} else { } else {
sendFunc(); sendFunc();
} }
...@@ -23066,7 +23117,8 @@ Strophe.Bosh.prototype = { ...@@ -23066,7 +23117,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Strophe.Request) req - The request to remove. * (Strophe.Request) req - The request to remove.
*/ */
_removeRequest: function (req) { _removeRequest: function (req)
{
Strophe.debug("removing request"); Strophe.debug("removing request");
var i; var i;
...@@ -23088,7 +23140,8 @@ Strophe.Bosh.prototype = { ...@@ -23088,7 +23140,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Integer) i - The index of the request in the queue. * (Integer) i - The index of the request in the queue.
*/ */
_restartRequest: function (i) { _restartRequest: function (i)
{
var req = this._requests[i]; var req = this._requests[i];
if (req.dead === null) { if (req.dead === null) {
req.dead = new Date(); req.dead = new Date();
...@@ -23109,7 +23162,8 @@ Strophe.Bosh.prototype = { ...@@ -23109,7 +23162,8 @@ Strophe.Bosh.prototype = {
* Returns: * Returns:
* The stanza that was passed. * The stanza that was passed.
*/ */
_reqToData: function (req) { _reqToData: function (req)
{
try { try {
return req.getResponse(); return req.getResponse();
} catch (e) { } catch (e) {
...@@ -23125,7 +23179,8 @@ Strophe.Bosh.prototype = { ...@@ -23125,7 +23179,8 @@ Strophe.Bosh.prototype = {
* the BOSH server a terminate body and includes an unavailable * the BOSH server a terminate body and includes an unavailable
* presence if authentication has completed. * presence if authentication has completed.
*/ */
_sendTerminate: function (pres) { _sendTerminate: function (pres)
{
Strophe.info("_sendTerminate was called"); Strophe.info("_sendTerminate was called");
var body = this._buildBody().attrs({type: "terminate"}); var body = this._buildBody().attrs({type: "terminate"});
...@@ -23150,18 +23205,15 @@ Strophe.Bosh.prototype = { ...@@ -23150,18 +23205,15 @@ Strophe.Bosh.prototype = {
_send: function () { _send: function () {
clearTimeout(this._conn._idleTimeout); clearTimeout(this._conn._idleTimeout);
this._throttledRequestHandler(); this._throttledRequestHandler();
this._conn._idleTimeout = setTimeout(this._conn._onIdle.bind(this._conn), 100);
// XXX: setTimeout should be called only with function expressions (23974bc1)
this._conn._idleTimeout = setTimeout(function() {
this._onIdle();
}.bind(this._conn), 100);
}, },
/** PrivateFunction: _sendRestart /** PrivateFunction: _sendRestart
* *
* Send an xmpp:restart stanza. * Send an xmpp:restart stanza.
*/ */
_sendRestart: function () { _sendRestart: function ()
{
this._throttledRequestHandler(); this._throttledRequestHandler();
clearTimeout(this._conn._idleTimeout); clearTimeout(this._conn._idleTimeout);
}, },
...@@ -23173,7 +23225,8 @@ Strophe.Bosh.prototype = { ...@@ -23173,7 +23225,8 @@ Strophe.Bosh.prototype = {
* request ids overflow the connection window in the case that one * request ids overflow the connection window in the case that one
* request died. * request died.
*/ */
_throttledRequestHandler: function () { _throttledRequestHandler: function ()
{
if (!this._requests) { if (!this._requests) {
Strophe.debug("_throttledRequestHandler called with " + Strophe.debug("_throttledRequestHandler called with " +
"undefined requests"); "undefined requests");
...@@ -23288,7 +23341,8 @@ Strophe.Websocket.prototype = { ...@@ -23288,7 +23341,8 @@ Strophe.Websocket.prototype = {
* Returns: * Returns:
* A Strophe.Builder with a <stream> element. * A Strophe.Builder with a <stream> element.
*/ */
_buildStream: function () { _buildStream: function ()
{
return $build("open", { return $build("open", {
"xmlns": Strophe.NS.FRAMING, "xmlns": Strophe.NS.FRAMING,
"to": this._conn.domain, "to": this._conn.domain,
...@@ -23358,7 +23412,8 @@ Strophe.Websocket.prototype = { ...@@ -23358,7 +23412,8 @@ Strophe.Websocket.prototype = {
* This function is called by the reset function of the Strophe Connection. * This function is called by the reset function of the Strophe Connection.
* Is not needed by WebSockets. * Is not needed by WebSockets.
*/ */
_reset: function () { _reset: function ()
{
return; return;
}, },
...@@ -23480,7 +23535,8 @@ Strophe.Websocket.prototype = { ...@@ -23480,7 +23535,8 @@ Strophe.Websocket.prototype = {
* Parameters: * Parameters:
* (Request) pres - This stanza will be sent before disconnecting. * (Request) pres - This stanza will be sent before disconnecting.
*/ */
_disconnect: function (pres) { _disconnect: function (pres)
{
if (this.socket && this.socket.readyState !== WebSocket.CLOSED) { if (this.socket && this.socket.readyState !== WebSocket.CLOSED) {
if (pres) { if (pres) {
this._conn.send(pres); this._conn.send(pres);
...@@ -23503,7 +23559,8 @@ Strophe.Websocket.prototype = { ...@@ -23503,7 +23559,8 @@ Strophe.Websocket.prototype = {
* *
* Just closes the Socket for WebSockets * Just closes the Socket for WebSockets
*/ */
_doDisconnect: function () { _doDisconnect: function ()
{
Strophe.info("WebSockets _doDisconnect was called"); Strophe.info("WebSockets _doDisconnect was called");
this._closeSocket(); this._closeSocket();
}, },
...@@ -23512,7 +23569,8 @@ Strophe.Websocket.prototype = { ...@@ -23512,7 +23569,8 @@ Strophe.Websocket.prototype = {
* _Private_ helper function to wrap a stanza in a <stream> tag. * _Private_ helper function to wrap a stanza in a <stream> tag.
* This is used so Strophe can process stanzas from WebSockets like BOSH * This is used so Strophe can process stanzas from WebSockets like BOSH
*/ */
_streamWrap: function (stanza) { _streamWrap: function (stanza)
{
return "<wrapper>" + stanza + '</wrapper>'; return "<wrapper>" + stanza + '</wrapper>';
}, },
...@@ -23522,7 +23580,8 @@ Strophe.Websocket.prototype = { ...@@ -23522,7 +23580,8 @@ Strophe.Websocket.prototype = {
* *
* Closes the socket if it is still open and deletes it * Closes the socket if it is still open and deletes it
*/ */
_closeSocket: function () { _closeSocket: function ()
{
if (this.socket) { try { if (this.socket) { try {
this.socket.close(); this.socket.close();
} catch (e) {} } } catch (e) {} }
...@@ -23535,7 +23594,8 @@ Strophe.Websocket.prototype = { ...@@ -23535,7 +23594,8 @@ Strophe.Websocket.prototype = {
* Returns: * Returns:
* True, because WebSocket messages are send immediately after queueing. * True, because WebSocket messages are send immediately after queueing.
*/ */
_emptyQueue: function () { _emptyQueue: function ()
{
return true; return true;
}, },
...@@ -23546,7 +23606,7 @@ Strophe.Websocket.prototype = { ...@@ -23546,7 +23606,7 @@ Strophe.Websocket.prototype = {
*/ */
_onClose: function() { _onClose: function() {
if(this._conn.connected && !this._conn.disconnecting) { if(this._conn.connected && !this._conn.disconnecting) {
Strophe.error("Websocket closed unexpectedly"); Strophe.error("Websocket closed unexcectedly");
this._conn._doDisconnect(); this._conn._doDisconnect();
} else { } else {
Strophe.info("Websocket closed"); Strophe.info("Websocket closed");
...@@ -23558,7 +23618,8 @@ Strophe.Websocket.prototype = { ...@@ -23558,7 +23618,8 @@ Strophe.Websocket.prototype = {
* Called on stream start/restart when no stream:features * Called on stream start/restart when no stream:features
* has been received. * has been received.
*/ */
_no_auth_received: function (_callback) { _no_auth_received: function (_callback)
{
Strophe.error("Server did not send any auth methods"); Strophe.error("Server did not send any auth methods");
this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "Server did not send any auth methods"); this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "Server did not send any auth methods");
if (_callback) { if (_callback) {
...@@ -23621,22 +23682,11 @@ Strophe.Websocket.prototype = { ...@@ -23621,22 +23682,11 @@ Strophe.Websocket.prototype = {
/** PrivateFunction: _onMessage /** PrivateFunction: _onMessage
* _Private_ function to handle websockets messages. * _Private_ function to handle websockets messages.
* *
* This function parses each of the messages as if they are full documents. * This function parses each of the messages as if they are full documents. [TODO : We may actually want to use a SAX Push parser].
* [TODO : We may actually want to use a SAX Push parser].
* *
* Since all XMPP traffic starts with * Since all XMPP traffic starts with "<stream:stream version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3697395463' from='SERVER'>"
* <stream:stream version='1.0' * The first stanza will always fail to be parsed...
* xml:lang='en' * Addtionnaly, the seconds stanza will always be a <stream:features> with the stream NS defined in the previous stanza... so we need to 'force' the inclusion of the NS in this stanza!
* xmlns='jabber:client'
* xmlns:stream='http://etherx.jabber.org/streams'
* id='3697395463'
* from='SERVER'>
*
* The first stanza will always fail to be parsed.
*
* Additionally, the seconds stanza will always be <stream:features> with
* the stream NS defined in the previous stanza, so we need to 'force'
* the inclusion of the NS in this stanza.
* *
* Parameters: * Parameters:
* (string) message - The websocket message. * (string) message - The websocket message.
...@@ -23655,6 +23705,7 @@ Strophe.Websocket.prototype = { ...@@ -23655,6 +23705,7 @@ Strophe.Websocket.prototype = {
} else if (message.data.search("<open ") === 0) { } else if (message.data.search("<open ") === 0) {
// This handles stream restarts // This handles stream restarts
elem = new DOMParser().parseFromString(message.data, "text/xml").documentElement; elem = new DOMParser().parseFromString(message.data, "text/xml").documentElement;
if (!this._handleStreamStart(elem)) { if (!this._handleStreamStart(elem)) {
return; return;
} }
...@@ -23706,7 +23757,8 @@ Strophe.Websocket.prototype = { ...@@ -23706,7 +23757,8 @@ Strophe.Websocket.prototype = {
* Returns: * Returns:
* The stanza that was passed. * The stanza that was passed.
*/ */
_reqToData: function (stanza) { _reqToData: function (stanza)
{
return stanza; return stanza;
}, },
...@@ -23723,7 +23775,8 @@ Strophe.Websocket.prototype = { ...@@ -23723,7 +23775,8 @@ Strophe.Websocket.prototype = {
* *
* Send an xmpp:restart stanza. * Send an xmpp:restart stanza.
*/ */
_sendRestart: function () { _sendRestart: function ()
{
clearTimeout(this._conn._idleTimeout); clearTimeout(this._conn._idleTimeout);
this._conn._onIdle.bind(this._conn)(); this._conn._onIdle.bind(this._conn)();
} }
...@@ -23938,9 +23991,8 @@ return Strophe; ...@@ -23938,9 +23991,8 @@ return Strophe;
})); }));
/** /**
* @license RequireJS text 2.0.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. * @license text 2.0.15 Copyright jQuery Foundation and other contributors.
* Available via the MIT or new BSD license. * Released under MIT license, http://github.com/requirejs/text/LICENSE
* see: http://github.com/requirejs/text for details
*/ */
/*jslint regexp: true */ /*jslint regexp: true */
/*global require, XMLHttpRequest, ActiveXObject, /*global require, XMLHttpRequest, ActiveXObject,
...@@ -23961,8 +24013,26 @@ define('text',['module'], function (module) { ...@@ -23961,8 +24013,26 @@ define('text',['module'], function (module) {
buildMap = {}, buildMap = {},
masterConfig = (module.config && module.config()) || {}; masterConfig = (module.config && module.config()) || {};
function useDefault(value, defaultValue) {
return value === undefined || value === '' ? defaultValue : value;
}
//Allow for default ports for http and https.
function isSamePort(protocol1, port1, protocol2, port2) {
if (port1 === port2) {
return true;
} else if (protocol1 === protocol2) {
if (protocol1 === 'http') {
return useDefault(port1, '80') === useDefault(port2, '80');
} else if (protocol1 === 'https') {
return useDefault(port1, '443') === useDefault(port2, '443');
}
}
return false;
}
text = { text = {
version: '2.0.14', version: '2.0.15',
strip: function (content) { strip: function (content) {
//Strips <?xml ...?> declarations so that external SVG and XML //Strips <?xml ...?> declarations so that external SVG and XML
...@@ -24080,7 +24150,7 @@ define('text',['module'], function (module) { ...@@ -24080,7 +24150,7 @@ define('text',['module'], function (module) {
return (!uProtocol || uProtocol === protocol) && return (!uProtocol || uProtocol === protocol) &&
(!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) && (!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &&
((!uPort && !uHostName) || uPort === port); ((!uPort && !uHostName) || isSamePort(uProtocol, uPort, protocol, port));
}, },
finishLoad: function (name, strip, content, onLoad) { finishLoad: function (name, strip, content, onLoad) {
...@@ -33666,7 +33736,8 @@ define('text!zh',[],function () { return '{\n "domain": "converse",\n "local ...@@ -33666,7 +33736,8 @@ define('text!zh',[],function () { return '{\n "domain": "converse",\n "local
* fetching the roster we are ready to receive presence * fetching the roster we are ready to receive presence
* updates from our contacts. * updates from our contacts.
*/ */
converse.roster.fetchFromServer(converse.xmppstatus.sendPresence); converse.roster.fetchFromServer(
converse.xmppstatus.sendPresence.bind(converse.xmppstatus));
} else if (converse.send_initial_presence) { } else if (converse.send_initial_presence) {
/* We're not going to fetch the roster again because we have /* We're not going to fetch the roster again because we have
* it already cached in sessionStorage, but we still need to * it already cached in sessionStorage, but we still need to
...@@ -428,9 +428,8 @@ var requirejs, require, define; ...@@ -428,9 +428,8 @@ var requirejs, require, define;
define("components/almond/almond.js", function(){}); define("components/almond/almond.js", function(){});
/** /**
* @license RequireJS text 2.0.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. * @license text 2.0.15 Copyright jQuery Foundation and other contributors.
* Available via the MIT or new BSD license. * Released under MIT license, http://github.com/requirejs/text/LICENSE
* see: http://github.com/requirejs/text for details
*/ */
/*jslint regexp: true */ /*jslint regexp: true */
/*global require, XMLHttpRequest, ActiveXObject, /*global require, XMLHttpRequest, ActiveXObject,
...@@ -451,8 +450,26 @@ define('text',['module'], function (module) { ...@@ -451,8 +450,26 @@ define('text',['module'], function (module) {
buildMap = {}, buildMap = {},
masterConfig = (module.config && module.config()) || {}; masterConfig = (module.config && module.config()) || {};
function useDefault(value, defaultValue) {
return value === undefined || value === '' ? defaultValue : value;
}
//Allow for default ports for http and https.
function isSamePort(protocol1, port1, protocol2, port2) {
if (port1 === port2) {
return true;
} else if (protocol1 === protocol2) {
if (protocol1 === 'http') {
return useDefault(port1, '80') === useDefault(port2, '80');
} else if (protocol1 === 'https') {
return useDefault(port1, '443') === useDefault(port2, '443');
}
}
return false;
}
text = { text = {
version: '2.0.14', version: '2.0.15',
strip: function (content) { strip: function (content) {
//Strips <?xml ...?> declarations so that external SVG and XML //Strips <?xml ...?> declarations so that external SVG and XML
...@@ -570,7 +587,7 @@ define('text',['module'], function (module) { ...@@ -570,7 +587,7 @@ define('text',['module'], function (module) {
return (!uProtocol || uProtocol === protocol) && return (!uProtocol || uProtocol === protocol) &&
(!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) && (!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &&
((!uPort && !uHostName) || uPort === port); ((!uPort && !uHostName) || isSamePort(uProtocol, uPort, protocol, port));
}, },
finishLoad: function (name, strip, content, onLoad) { finishLoad: function (name, strip, content, onLoad) {
...@@ -6627,7 +6644,8 @@ define('text!ca',[],function () { return '{\n "domain": "converse",\n "local ...@@ -6627,7 +6644,8 @@ define('text!ca',[],function () { return '{\n "domain": "converse",\n "local
* fetching the roster we are ready to receive presence * fetching the roster we are ready to receive presence
* updates from our contacts. * updates from our contacts.
*/ */
converse.roster.fetchFromServer(converse.xmppstatus.sendPresence); converse.roster.fetchFromServer(
converse.xmppstatus.sendPresence.bind(converse.xmppstatus));
} else if (converse.send_initial_presence) { } else if (converse.send_initial_presence) {
/* We're not going to fetch the roster again because we have /* We're not going to fetch the roster again because we have
* it already cached in sessionStorage, but we still need to * it already cached in sessionStorage, but we still need to
......
...@@ -18799,7 +18799,8 @@ return { ...@@ -18799,7 +18799,8 @@ return {
* The bound function. * The bound function.
*/ */
if (!Function.prototype.bind) { if (!Function.prototype.bind) {
Function.prototype.bind = function (obj /*, arg1, arg2, ... */) { Function.prototype.bind = function (obj /*, arg1, arg2, ... */)
{
var func = this; var func = this;
var _slice = Array.prototype.slice; var _slice = Array.prototype.slice;
var _concat = Array.prototype.concat; var _concat = Array.prototype.concat;
...@@ -18858,7 +18859,6 @@ if (!Array.prototype.indexOf) ...@@ -18858,7 +18859,6 @@ if (!Array.prototype.indexOf)
}; };
} }
})); }));
/* /*
This program is distributed under the terms of the MIT license. This program is distributed under the terms of the MIT license.
Please see the LICENSE file for details. Please see the LICENSE file for details.
...@@ -19081,7 +19081,6 @@ Strophe = { ...@@ -19081,7 +19081,6 @@ Strophe = {
* Status.DISCONNECTED - The connection has been terminated * Status.DISCONNECTED - The connection has been terminated
* Status.DISCONNECTING - The connection is currently being terminated * Status.DISCONNECTING - The connection is currently being terminated
* Status.ATTACHED - The connection has been attached * Status.ATTACHED - The connection has been attached
* Status.CONNTIMEOUT - The connection has timed out
*/ */
Status: { Status: {
ERROR: 0, ERROR: 0,
...@@ -19093,8 +19092,7 @@ Strophe = { ...@@ -19093,8 +19092,7 @@ Strophe = {
DISCONNECTED: 6, DISCONNECTED: 6,
DISCONNECTING: 7, DISCONNECTING: 7,
ATTACHED: 8, ATTACHED: 8,
REDIRECT: 9, REDIRECT: 9
CONNTIMEOUT: 10
}, },
/** Constants: Log Level Constants /** Constants: Log Level Constants
...@@ -19157,7 +19155,8 @@ Strophe = { ...@@ -19157,7 +19155,8 @@ Strophe = {
* referenced under Strophe.NS * referenced under Strophe.NS
* (String) value - The actual namespace. * (String) value - The actual namespace.
*/ */
addNamespace: function (name, value) { addNamespace: function (name, value)
{
Strophe.NS[name] = value; Strophe.NS[name] = value;
}, },
...@@ -19175,7 +19174,8 @@ Strophe = { ...@@ -19175,7 +19174,8 @@ Strophe = {
* (Function) func - The function to apply to each child. This * (Function) func - The function to apply to each child. This
* function should take a single argument, a DOM element. * function should take a single argument, a DOM element.
*/ */
forEachChild: function (elem, elemName, func) { forEachChild: function (elem, elemName, func)
{
var i, childNode; var i, childNode;
for (i = 0; i < elem.childNodes.length; i++) { for (i = 0; i < elem.childNodes.length; i++) {
...@@ -19200,7 +19200,8 @@ Strophe = { ...@@ -19200,7 +19200,8 @@ Strophe = {
* true if the element's tag name matches _el_, and false * true if the element's tag name matches _el_, and false
* otherwise. * otherwise.
*/ */
isTagEqual: function (el, name) { isTagEqual: function (el, name)
{
return el.tagName == name; return el.tagName == name;
}, },
...@@ -19298,7 +19299,8 @@ Strophe = { ...@@ -19298,7 +19299,8 @@ Strophe = {
* Returns: * Returns:
* A new XML DOM element. * A new XML DOM element.
*/ */
xmlElement: function (name) { xmlElement: function (name)
{
if (!name) { return null; } if (!name) { return null; }
var node = Strophe.xmlGenerator().createElement(name); var node = Strophe.xmlGenerator().createElement(name);
...@@ -19387,7 +19389,8 @@ Strophe = { ...@@ -19387,7 +19389,8 @@ Strophe = {
* Returns: * Returns:
* A new XML DOM text node. * A new XML DOM text node.
*/ */
xmlTextNode: function (text) { xmlTextNode: function (text)
{
return Strophe.xmlGenerator().createTextNode(text); return Strophe.xmlGenerator().createTextNode(text);
}, },
...@@ -19400,7 +19403,8 @@ Strophe = { ...@@ -19400,7 +19403,8 @@ Strophe = {
* Returns: * Returns:
* A new XML DOM text node. * A new XML DOM text node.
*/ */
xmlHtmlNode: function (html) { xmlHtmlNode: function (html)
{
var node; var node;
//ensure text is escaped //ensure text is escaped
if (window.DOMParser) { if (window.DOMParser) {
...@@ -19423,7 +19427,8 @@ Strophe = { ...@@ -19423,7 +19427,8 @@ Strophe = {
* Returns: * Returns:
* A String with the concatenated text of all text element children. * A String with the concatenated text of all text element children.
*/ */
getText: function (elem) { getText: function (elem)
{
if (!elem) { return null; } if (!elem) { return null; }
var str = ""; var str = "";
...@@ -19453,7 +19458,8 @@ Strophe = { ...@@ -19453,7 +19458,8 @@ Strophe = {
* Returns: * Returns:
* A new, copied DOM element tree. * A new, copied DOM element tree.
*/ */
copyElement: function (elem) { copyElement: function (elem)
{
var i, el; var i, el;
if (elem.nodeType == Strophe.ElementType.NORMAL) { if (elem.nodeType == Strophe.ElementType.NORMAL) {
el = Strophe.xmlElement(elem.tagName); el = Strophe.xmlElement(elem.tagName);
...@@ -19486,7 +19492,8 @@ Strophe = { ...@@ -19486,7 +19492,8 @@ Strophe = {
* Returns: * Returns:
* A new, copied DOM element tree. * A new, copied DOM element tree.
*/ */
createHtml: function (elem) { createHtml: function (elem)
{
var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue; var i, el, j, tag, attribute, value, css, cssAttrs, attr, cssName, cssValue;
if (elem.nodeType == Strophe.ElementType.NORMAL) { if (elem.nodeType == Strophe.ElementType.NORMAL) {
tag = elem.nodeName.toLowerCase(); // XHTML tags must be lower case. tag = elem.nodeName.toLowerCase(); // XHTML tags must be lower case.
...@@ -19558,7 +19565,8 @@ Strophe = { ...@@ -19558,7 +19565,8 @@ Strophe = {
* Returns: * Returns:
* An escaped node (or local part). * An escaped node (or local part).
*/ */
escapeNode: function (node) { escapeNode: function (node)
{
if (typeof node !== "string") { return node; } if (typeof node !== "string") { return node; }
return node.replace(/^\s+|\s+$/g, '') return node.replace(/^\s+|\s+$/g, '')
.replace(/\\/g, "\\5c") .replace(/\\/g, "\\5c")
...@@ -19582,7 +19590,8 @@ Strophe = { ...@@ -19582,7 +19590,8 @@ Strophe = {
* Returns: * Returns:
* An unescaped node (or local part). * An unescaped node (or local part).
*/ */
unescapeNode: function (node) { unescapeNode: function (node)
{
if (typeof node !== "string") { return node; } if (typeof node !== "string") { return node; }
return node.replace(/\\20/g, " ") return node.replace(/\\20/g, " ")
.replace(/\\22/g, '"') .replace(/\\22/g, '"')
...@@ -19605,7 +19614,8 @@ Strophe = { ...@@ -19605,7 +19614,8 @@ Strophe = {
* Returns: * Returns:
* A String containing the node. * A String containing the node.
*/ */
getNodeFromJid: function (jid) { getNodeFromJid: function (jid)
{
if (jid.indexOf("@") < 0) { return null; } if (jid.indexOf("@") < 0) { return null; }
return jid.split("@")[0]; return jid.split("@")[0];
}, },
...@@ -19619,7 +19629,8 @@ Strophe = { ...@@ -19619,7 +19629,8 @@ Strophe = {
* Returns: * Returns:
* A String containing the domain. * A String containing the domain.
*/ */
getDomainFromJid: function (jid) { getDomainFromJid: function (jid)
{
var bare = Strophe.getBareJidFromJid(jid); var bare = Strophe.getBareJidFromJid(jid);
if (bare.indexOf("@") < 0) { if (bare.indexOf("@") < 0) {
return bare; return bare;
...@@ -19639,7 +19650,8 @@ Strophe = { ...@@ -19639,7 +19650,8 @@ Strophe = {
* Returns: * Returns:
* A String containing the resource. * A String containing the resource.
*/ */
getResourceFromJid: function (jid) { getResourceFromJid: function (jid)
{
var s = jid.split("/"); var s = jid.split("/");
if (s.length < 2) { return null; } if (s.length < 2) { return null; }
s.splice(0, 1); s.splice(0, 1);
...@@ -19655,7 +19667,8 @@ Strophe = { ...@@ -19655,7 +19667,8 @@ Strophe = {
* Returns: * Returns:
* A String containing the bare JID. * A String containing the bare JID.
*/ */
getBareJidFromJid: function (jid) { getBareJidFromJid: function (jid)
{
return jid ? jid.split("/")[0] : null; return jid ? jid.split("/")[0] : null;
}, },
...@@ -19689,7 +19702,8 @@ Strophe = { ...@@ -19689,7 +19702,8 @@ Strophe = {
* (String) msg - The log message. * (String) msg - The log message.
*/ */
/* jshint ignore:start */ /* jshint ignore:start */
log: function (level, msg) { log: function (level, msg)
{
return; return;
}, },
/* jshint ignore:end */ /* jshint ignore:end */
...@@ -19711,7 +19725,8 @@ Strophe = { ...@@ -19711,7 +19725,8 @@ Strophe = {
* Parameters: * Parameters:
* (String) msg - The log message. * (String) msg - The log message.
*/ */
info: function (msg) { info: function (msg)
{
this.log(this.LogLevel.INFO, msg); this.log(this.LogLevel.INFO, msg);
}, },
...@@ -19721,7 +19736,8 @@ Strophe = { ...@@ -19721,7 +19736,8 @@ Strophe = {
* Parameters: * Parameters:
* (String) msg - The log message. * (String) msg - The log message.
*/ */
warn: function (msg) { warn: function (msg)
{
this.log(this.LogLevel.WARN, msg); this.log(this.LogLevel.WARN, msg);
}, },
...@@ -19731,7 +19747,8 @@ Strophe = { ...@@ -19731,7 +19747,8 @@ Strophe = {
* Parameters: * Parameters:
* (String) msg - The log message. * (String) msg - The log message.
*/ */
error: function (msg) { error: function (msg)
{
this.log(this.LogLevel.ERROR, msg); this.log(this.LogLevel.ERROR, msg);
}, },
...@@ -19741,7 +19758,8 @@ Strophe = { ...@@ -19741,7 +19758,8 @@ Strophe = {
* Parameters: * Parameters:
* (String) msg - The log message. * (String) msg - The log message.
*/ */
fatal: function (msg) { fatal: function (msg)
{
this.log(this.LogLevel.FATAL, msg); this.log(this.LogLevel.FATAL, msg);
}, },
...@@ -19754,7 +19772,8 @@ Strophe = { ...@@ -19754,7 +19772,8 @@ Strophe = {
* Returns: * Returns:
* The serialized element tree as a String. * The serialized element tree as a String.
*/ */
serialize: function (elem) { serialize: function (elem)
{
var result; var result;
if (!elem) { return null; } if (!elem) { return null; }
...@@ -19827,7 +19846,8 @@ Strophe = { ...@@ -19827,7 +19846,8 @@ Strophe = {
* (String) name - The name of the extension. * (String) name - The name of the extension.
* (Object) ptype - The plugin's prototype. * (Object) ptype - The plugin's prototype.
*/ */
addConnectionPlugin: function (name, ptype) { addConnectionPlugin: function (name, ptype)
{
Strophe._connectionPlugins[name] = ptype; Strophe._connectionPlugins[name] = ptype;
} }
}; };
...@@ -19873,7 +19893,8 @@ Strophe = { ...@@ -19873,7 +19893,8 @@ Strophe = {
* Returns: * Returns:
* A new Strophe.Builder. * A new Strophe.Builder.
*/ */
Strophe.Builder = function (name, attrs) { Strophe.Builder = function (name, attrs)
{
// Set correct namespace for jabber:client elements // Set correct namespace for jabber:client elements
if (name == "presence" || name == "message" || name == "iq") { if (name == "presence" || name == "message" || name == "iq") {
if (attrs && !attrs.xmlns) { if (attrs && !attrs.xmlns) {
...@@ -19900,7 +19921,8 @@ Strophe.Builder.prototype = { ...@@ -19900,7 +19921,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The DOM tree as a element object. * The DOM tree as a element object.
*/ */
tree: function () { tree: function ()
{
return this.nodeTree; return this.nodeTree;
}, },
...@@ -19914,7 +19936,8 @@ Strophe.Builder.prototype = { ...@@ -19914,7 +19936,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The serialized DOM tree in a String. * The serialized DOM tree in a String.
*/ */
toString: function () { toString: function ()
{
return Strophe.serialize(this.nodeTree); return Strophe.serialize(this.nodeTree);
}, },
...@@ -19928,7 +19951,8 @@ Strophe.Builder.prototype = { ...@@ -19928,7 +19951,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Stophe.Builder object. * The Stophe.Builder object.
*/ */
up: function () { up: function ()
{
this.node = this.node.parentNode; this.node = this.node.parentNode;
return this; return this;
}, },
...@@ -19945,7 +19969,8 @@ Strophe.Builder.prototype = { ...@@ -19945,7 +19969,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Strophe.Builder object. * The Strophe.Builder object.
*/ */
attrs: function (moreattrs) { attrs: function (moreattrs)
{
for (var k in moreattrs) { for (var k in moreattrs) {
if (moreattrs.hasOwnProperty(k)) { if (moreattrs.hasOwnProperty(k)) {
if (moreattrs[k] === undefined) { if (moreattrs[k] === undefined) {
...@@ -19974,7 +19999,8 @@ Strophe.Builder.prototype = { ...@@ -19974,7 +19999,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Strophe.Builder object. * The Strophe.Builder object.
*/ */
c: function (name, attrs, text) { c: function (name, attrs, text)
{
var child = Strophe.xmlElement(name, attrs, text); var child = Strophe.xmlElement(name, attrs, text);
this.node.appendChild(child); this.node.appendChild(child);
if (typeof text !== "string") { if (typeof text !== "string") {
...@@ -19997,7 +20023,8 @@ Strophe.Builder.prototype = { ...@@ -19997,7 +20023,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Strophe.Builder object. * The Strophe.Builder object.
*/ */
cnode: function (elem) { cnode: function (elem)
{
var impNode; var impNode;
var xmlGen = Strophe.xmlGenerator(); var xmlGen = Strophe.xmlGenerator();
try { try {
...@@ -20026,7 +20053,8 @@ Strophe.Builder.prototype = { ...@@ -20026,7 +20053,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Strophe.Builder object. * The Strophe.Builder object.
*/ */
t: function (text) { t: function (text)
{
var child = Strophe.xmlTextNode(text); var child = Strophe.xmlTextNode(text);
this.node.appendChild(child); this.node.appendChild(child);
return this; return this;
...@@ -20043,7 +20071,8 @@ Strophe.Builder.prototype = { ...@@ -20043,7 +20071,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* The Strophe.Builder object. * The Strophe.Builder object.
*/ */
h: function (html) { h: function (html)
{
var fragment = document.createElement('body'); var fragment = document.createElement('body');
// force the browser to try and fix any invalid HTML tags // force the browser to try and fix any invalid HTML tags
...@@ -20088,7 +20117,8 @@ Strophe.Builder.prototype = { ...@@ -20088,7 +20117,8 @@ Strophe.Builder.prototype = {
* Returns: * Returns:
* A new Strophe.Handler object. * A new Strophe.Handler object.
*/ */
Strophe.Handler = function (handler, ns, name, type, id, from, options) { Strophe.Handler = function (handler, ns, name, type, id, from, options)
{
this.handler = handler; this.handler = handler;
this.ns = ns; this.ns = ns;
this.name = name; this.name = name;
...@@ -20121,7 +20151,8 @@ Strophe.Handler.prototype = { ...@@ -20121,7 +20151,8 @@ Strophe.Handler.prototype = {
* Returns: * Returns:
* true if the stanza matches and false otherwise. * true if the stanza matches and false otherwise.
*/ */
isMatch: function (elem) { isMatch: function (elem)
{
var nsMatch; var nsMatch;
var from = null; var from = null;
...@@ -20167,7 +20198,8 @@ Strophe.Handler.prototype = { ...@@ -20167,7 +20198,8 @@ Strophe.Handler.prototype = {
* Returns: * Returns:
* A boolean indicating if the handler should remain active. * A boolean indicating if the handler should remain active.
*/ */
run: function (elem) { run: function (elem)
{
var result = null; var result = null;
try { try {
result = this.handler(elem); result = this.handler(elem);
...@@ -20200,7 +20232,8 @@ Strophe.Handler.prototype = { ...@@ -20200,7 +20232,8 @@ Strophe.Handler.prototype = {
* Returns: * Returns:
* A String. * A String.
*/ */
toString: function () { toString: function ()
{
return "{Handler: " + this.handler + "(" + this.name + "," + return "{Handler: " + this.handler + "(" + this.name + "," +
this.id + "," + this.ns + ")}"; this.id + "," + this.ns + ")}";
} }
...@@ -20231,7 +20264,8 @@ Strophe.Handler.prototype = { ...@@ -20231,7 +20264,8 @@ Strophe.Handler.prototype = {
* Returns: * Returns:
* A new Strophe.TimedHandler object. * A new Strophe.TimedHandler object.
*/ */
Strophe.TimedHandler = function (period, handler) { Strophe.TimedHandler = function (period, handler)
{
this.period = period; this.period = period;
this.handler = handler; this.handler = handler;
...@@ -20247,7 +20281,8 @@ Strophe.TimedHandler.prototype = { ...@@ -20247,7 +20281,8 @@ Strophe.TimedHandler.prototype = {
* true if the Strophe.TimedHandler should be called again, and false * true if the Strophe.TimedHandler should be called again, and false
* otherwise. * otherwise.
*/ */
run: function () { run: function ()
{
this.lastCalled = new Date().getTime(); this.lastCalled = new Date().getTime();
return this.handler(); return this.handler();
}, },
...@@ -20255,7 +20290,8 @@ Strophe.TimedHandler.prototype = { ...@@ -20255,7 +20290,8 @@ Strophe.TimedHandler.prototype = {
/** PrivateFunction: reset /** PrivateFunction: reset
* Reset the last called time for the Strophe.TimedHandler. * Reset the last called time for the Strophe.TimedHandler.
*/ */
reset: function () { reset: function ()
{
this.lastCalled = new Date().getTime(); this.lastCalled = new Date().getTime();
}, },
...@@ -20265,7 +20301,8 @@ Strophe.TimedHandler.prototype = { ...@@ -20265,7 +20301,8 @@ Strophe.TimedHandler.prototype = {
* Returns: * Returns:
* The string representation. * The string representation.
*/ */
toString: function () { toString: function ()
{
return "{TimedHandler: " + this.handler + "(" + this.period +")}"; return "{TimedHandler: " + this.handler + "(" + this.period +")}";
} }
}; };
...@@ -20312,8 +20349,13 @@ Strophe.TimedHandler.prototype = { ...@@ -20312,8 +20349,13 @@ Strophe.TimedHandler.prototype = {
* document. These cookies will then be included in the BOSH XMLHttpRequest * document. These cookies will then be included in the BOSH XMLHttpRequest
* or in the websocket connection. * or in the websocket connection.
* *
* The passed in value must be a map of cookie names and string values: * The passed in value must be a map of cookie names and string values or
* cookie attributes.
* *
* For example:
* { "myCookie": "1234" }
*
* or:
* { "myCookie": { * { "myCookie": {
* "value": "1234", * "value": "1234",
* "domain": ".example.org", * "domain": ".example.org",
...@@ -20373,7 +20415,7 @@ Strophe.TimedHandler.prototype = { ...@@ -20373,7 +20415,7 @@ Strophe.TimedHandler.prototype = {
* and for some reason need to send cookies to it. * and for some reason need to send cookies to it.
* In order for this to work cross-domain, the server must also enable * In order for this to work cross-domain, the server must also enable
* credentials by setting the Access-Control-Allow-Credentials response header * credentials by setting the Access-Control-Allow-Credentials response header
* to "true". For most usecases however this setting should be false (which * to “true”. For most usecases however this setting should be false (which
* is the default). * is the default).
* Additionally, when using Access-Control-Allow-Credentials, the * Additionally, when using Access-Control-Allow-Credentials, the
* Access-Control-Allow-Origin header can't be set to the wildcard "*", but * Access-Control-Allow-Origin header can't be set to the wildcard "*", but
...@@ -20386,7 +20428,8 @@ Strophe.TimedHandler.prototype = { ...@@ -20386,7 +20428,8 @@ Strophe.TimedHandler.prototype = {
* Returns: * Returns:
* A new Strophe.Connection object. * A new Strophe.Connection object.
*/ */
Strophe.Connection = function (service, options) { Strophe.Connection = function (service, options)
{
// The service URL // The service URL
this.service = service; this.service = service;
// Configuration options // Configuration options
...@@ -20443,10 +20486,7 @@ Strophe.Connection = function (service, options) { ...@@ -20443,10 +20486,7 @@ Strophe.Connection = function (service, options) {
this.maxRetries = 5; this.maxRetries = 5;
// Call onIdle callback every 1/10th of a second // Call onIdle callback every 1/10th of a second
// XXX: setTimeout should be called only with function expressions (23974bc1) this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
this._idleTimeout = setTimeout(function() {
this._onIdle();
}.bind(this), 100);
utils.addCookies(this.options.cookies); utils.addCookies(this.options.cookies);
...@@ -20470,7 +20510,8 @@ Strophe.Connection.prototype = { ...@@ -20470,7 +20510,8 @@ Strophe.Connection.prototype = {
* This function should be called after a connection is disconnected * This function should be called after a connection is disconnected
* before that connection is reused. * before that connection is reused.
*/ */
reset: function () { reset: function ()
{
this._proto._reset(); this._proto._reset();
// SASL // SASL
...@@ -20505,7 +20546,8 @@ Strophe.Connection.prototype = { ...@@ -20505,7 +20546,8 @@ Strophe.Connection.prototype = {
* This causes Strophe to send the data in a single request, saving * This causes Strophe to send the data in a single request, saving
* many request trips. * many request trips.
*/ */
pause: function () { pause: function ()
{
this.paused = true; this.paused = true;
}, },
...@@ -20514,7 +20556,8 @@ Strophe.Connection.prototype = { ...@@ -20514,7 +20556,8 @@ Strophe.Connection.prototype = {
* *
* This resumes after pause() has been called. * This resumes after pause() has been called.
*/ */
resume: function () { resume: function ()
{
this.paused = false; this.paused = false;
}, },
...@@ -20584,7 +20627,8 @@ Strophe.Connection.prototype = { ...@@ -20584,7 +20627,8 @@ Strophe.Connection.prototype = {
* (String) authcid - The optional alternative authentication identity * (String) authcid - The optional alternative authentication identity
* (username) if intending to impersonate another user. * (username) if intending to impersonate another user.
*/ */
connect: function (jid, pass, callback, wait, hold, route, authcid) { connect: function (jid, pass, callback, wait, hold, route, authcid)
{
this.jid = jid; this.jid = jid;
/** Variable: authzid /** Variable: authzid
* Authorization identity. * Authorization identity.
...@@ -20640,7 +20684,8 @@ Strophe.Connection.prototype = { ...@@ -20640,7 +20684,8 @@ Strophe.Connection.prototype = {
* (Integer) wind - The optional HTTBIND window value. This is the * (Integer) wind - The optional HTTBIND window value. This is the
* allowed range of request ids that are valid. The default is 5. * allowed range of request ids that are valid. The default is 5.
*/ */
attach: function (jid, sid, rid, callback, wait, hold, wind) { attach: function (jid, sid, rid, callback, wait, hold, wind)
{
if (this._proto instanceof Strophe.Bosh) { if (this._proto instanceof Strophe.Bosh) {
this._proto._attach(jid, sid, rid, callback, wait, hold, wind); this._proto._attach(jid, sid, rid, callback, wait, hold, wind);
} else { } else {
...@@ -20678,7 +20723,8 @@ Strophe.Connection.prototype = { ...@@ -20678,7 +20723,8 @@ Strophe.Connection.prototype = {
* (Integer) wind - The optional HTTBIND window value. This is the * (Integer) wind - The optional HTTBIND window value. This is the
* allowed range of request ids that are valid. The default is 5. * allowed range of request ids that are valid. The default is 5.
*/ */
restore: function (jid, callback, wait, hold, wind) { restore: function (jid, callback, wait, hold, wind)
{
if (this._sessionCachingSupported()) { if (this._sessionCachingSupported()) {
this._proto._restore(jid, callback, wait, hold, wind); this._proto._restore(jid, callback, wait, hold, wind);
} else { } else {
...@@ -20693,7 +20739,8 @@ Strophe.Connection.prototype = { ...@@ -20693,7 +20739,8 @@ Strophe.Connection.prototype = {
* Checks whether sessionStorage and JSON are supported and whether we're * Checks whether sessionStorage and JSON are supported and whether we're
* using BOSH. * using BOSH.
*/ */
_sessionCachingSupported: function () { _sessionCachingSupported: function ()
{
if (this._proto instanceof Strophe.Bosh) { if (this._proto instanceof Strophe.Bosh) {
if (!JSON) { return false; } if (!JSON) { return false; }
try { try {
...@@ -20726,7 +20773,8 @@ Strophe.Connection.prototype = { ...@@ -20726,7 +20773,8 @@ Strophe.Connection.prototype = {
* (XMLElement) elem - The XML data received by the connection. * (XMLElement) elem - The XML data received by the connection.
*/ */
/* jshint unused:false */ /* jshint unused:false */
xmlInput: function (elem) { xmlInput: function (elem)
{
return; return;
}, },
/* jshint unused:true */ /* jshint unused:true */
...@@ -20750,7 +20798,8 @@ Strophe.Connection.prototype = { ...@@ -20750,7 +20798,8 @@ Strophe.Connection.prototype = {
* (XMLElement) elem - The XMLdata sent by the connection. * (XMLElement) elem - The XMLdata sent by the connection.
*/ */
/* jshint unused:false */ /* jshint unused:false */
xmlOutput: function (elem) { xmlOutput: function (elem)
{
return; return;
}, },
/* jshint unused:true */ /* jshint unused:true */
...@@ -20768,7 +20817,8 @@ Strophe.Connection.prototype = { ...@@ -20768,7 +20817,8 @@ Strophe.Connection.prototype = {
* (String) data - The data received by the connection. * (String) data - The data received by the connection.
*/ */
/* jshint unused:false */ /* jshint unused:false */
rawInput: function (data) { rawInput: function (data)
{
return; return;
}, },
/* jshint unused:true */ /* jshint unused:true */
...@@ -20786,7 +20836,8 @@ Strophe.Connection.prototype = { ...@@ -20786,7 +20836,8 @@ Strophe.Connection.prototype = {
* (String) data - The data sent by the connection. * (String) data - The data sent by the connection.
*/ */
/* jshint unused:false */ /* jshint unused:false */
rawOutput: function (data) { rawOutput: function (data)
{
return; return;
}, },
/* jshint unused:true */ /* jshint unused:true */
...@@ -20803,7 +20854,8 @@ Strophe.Connection.prototype = { ...@@ -20803,7 +20854,8 @@ Strophe.Connection.prototype = {
* (Number) rid - The next valid rid * (Number) rid - The next valid rid
*/ */
/* jshint unused:false */ /* jshint unused:false */
nextValidRid: function (rid) { nextValidRid: function (rid)
{
return; return;
}, },
/* jshint unused:true */ /* jshint unused:true */
...@@ -20820,7 +20872,8 @@ Strophe.Connection.prototype = { ...@@ -20820,7 +20872,8 @@ Strophe.Connection.prototype = {
* [XMLElement] | * [XMLElement] |
* Strophe.Builder) elem - The stanza to send. * Strophe.Builder) elem - The stanza to send.
*/ */
send: function (elem) { send: function (elem)
{
if (elem === null) { return ; } if (elem === null) { return ; }
if (typeof(elem.sort) === "function") { if (typeof(elem.sort) === "function") {
for (var i = 0; i < elem.length; i++) { for (var i = 0; i < elem.length; i++) {
...@@ -20843,7 +20896,8 @@ Strophe.Connection.prototype = { ...@@ -20843,7 +20896,8 @@ Strophe.Connection.prototype = {
* several send()s are called in succession. flush() can be used to * several send()s are called in succession. flush() can be used to
* immediately send all pending data. * immediately send all pending data.
*/ */
flush: function () { flush: function ()
{
// cancel the pending idle period and run the idle function // cancel the pending idle period and run the idle function
// immediately // immediately
clearTimeout(this._idleTimeout); clearTimeout(this._idleTimeout);
...@@ -20959,15 +21013,13 @@ Strophe.Connection.prototype = { ...@@ -20959,15 +21013,13 @@ Strophe.Connection.prototype = {
/** PrivateFunction: _sendRestart /** PrivateFunction: _sendRestart
* Send an xmpp:restart stanza. * Send an xmpp:restart stanza.
*/ */
_sendRestart: function () { _sendRestart: function ()
{
this._data.push("restart"); this._data.push("restart");
this._proto._sendRestart(); this._proto._sendRestart();
// XXX: setTimeout should be called only with function expressions (23974bc1) this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
this._idleTimeout = setTimeout(function() {
this._onIdle();
}.bind(this), 100);
}, },
/** Function: addTimedHandler /** Function: addTimedHandler
...@@ -20992,7 +21044,8 @@ Strophe.Connection.prototype = { ...@@ -20992,7 +21044,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* A reference to the handler that can be used to remove it. * A reference to the handler that can be used to remove it.
*/ */
addTimedHandler: function (period, handler) { addTimedHandler: function (period, handler)
{
var thand = new Strophe.TimedHandler(period, handler); var thand = new Strophe.TimedHandler(period, handler);
this.addTimeds.push(thand); this.addTimeds.push(thand);
return thand; return thand;
...@@ -21008,7 +21061,8 @@ Strophe.Connection.prototype = { ...@@ -21008,7 +21061,8 @@ Strophe.Connection.prototype = {
* Parameters: * Parameters:
* (Strophe.TimedHandler) handRef - The handler reference. * (Strophe.TimedHandler) handRef - The handler reference.
*/ */
deleteTimedHandler: function (handRef) { deleteTimedHandler: function (handRef)
{
// this must be done in the Idle loop so that we don't change // this must be done in the Idle loop so that we don't change
// the handlers during iteration // the handlers during iteration
this.removeTimeds.push(handRef); this.removeTimeds.push(handRef);
...@@ -21052,7 +21106,8 @@ Strophe.Connection.prototype = { ...@@ -21052,7 +21106,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* A reference to the handler that can be used to remove it. * A reference to the handler that can be used to remove it.
*/ */
addHandler: function (handler, ns, name, type, id, from, options) { addHandler: function (handler, ns, name, type, id, from, options)
{
var hand = new Strophe.Handler(handler, ns, name, type, id, from, options); var hand = new Strophe.Handler(handler, ns, name, type, id, from, options);
this.addHandlers.push(hand); this.addHandlers.push(hand);
return hand; return hand;
...@@ -21068,7 +21123,8 @@ Strophe.Connection.prototype = { ...@@ -21068,7 +21123,8 @@ Strophe.Connection.prototype = {
* Parameters: * Parameters:
* (Strophe.Handler) handRef - The handler reference. * (Strophe.Handler) handRef - The handler reference.
*/ */
deleteHandler: function (handRef) { deleteHandler: function (handRef)
{
// this must be done in the Idle loop so that we don't change // this must be done in the Idle loop so that we don't change
// the handlers during iteration // the handlers during iteration
this.removeHandlers.push(handRef); this.removeHandlers.push(handRef);
...@@ -21096,7 +21152,8 @@ Strophe.Connection.prototype = { ...@@ -21096,7 +21152,8 @@ Strophe.Connection.prototype = {
* Parameters: * Parameters:
* (String) reason - The reason the disconnect is occuring. * (String) reason - The reason the disconnect is occuring.
*/ */
disconnect: function (reason) { disconnect: function (reason)
{
this._changeConnectStatus(Strophe.Status.DISCONNECTING, reason); this._changeConnectStatus(Strophe.Status.DISCONNECTING, reason);
Strophe.info("Disconnect was called because: " + reason); Strophe.info("Disconnect was called because: " + reason);
...@@ -21128,7 +21185,8 @@ Strophe.Connection.prototype = { ...@@ -21128,7 +21185,8 @@ Strophe.Connection.prototype = {
* in Strophe.Status * in Strophe.Status
* (String) condition - the error condition or null * (String) condition - the error condition or null
*/ */
_changeConnectStatus: function (status, condition) { _changeConnectStatus: function (status, condition)
{
// notify all plugins listening for status changes // notify all plugins listening for status changes
for (var k in Strophe._connectionPlugins) { for (var k in Strophe._connectionPlugins) {
if (Strophe._connectionPlugins.hasOwnProperty(k)) { if (Strophe._connectionPlugins.hasOwnProperty(k)) {
...@@ -21161,7 +21219,8 @@ Strophe.Connection.prototype = { ...@@ -21161,7 +21219,8 @@ Strophe.Connection.prototype = {
* This is the last piece of the disconnection logic. This resets the * This is the last piece of the disconnection logic. This resets the
* connection and alerts the user's connection callback. * connection and alerts the user's connection callback.
*/ */
_doDisconnect: function (condition) { _doDisconnect: function (condition)
{
if (typeof this._idleTimeout == "number") { if (typeof this._idleTimeout == "number") {
clearTimeout(this._idleTimeout); clearTimeout(this._idleTimeout);
} }
...@@ -21204,7 +21263,8 @@ Strophe.Connection.prototype = { ...@@ -21204,7 +21263,8 @@ Strophe.Connection.prototype = {
* (Strophe.Request) req - The request that has data ready. * (Strophe.Request) req - The request that has data ready.
* (string) req - The stanza a raw string (optiona). * (string) req - The stanza a raw string (optiona).
*/ */
_dataRecv: function (req, raw) { _dataRecv: function (req, raw)
{
Strophe.info("_dataRecv called"); Strophe.info("_dataRecv called");
var elem = this._proto._reqToData(req); var elem = this._proto._reqToData(req);
if (elem === null) { return; } if (elem === null) { return; }
...@@ -21318,7 +21378,8 @@ Strophe.Connection.prototype = { ...@@ -21318,7 +21378,8 @@ Strophe.Connection.prototype = {
* Useful for plugins with their own xmpp connect callback (when their) * Useful for plugins with their own xmpp connect callback (when their)
* want to do something special). * want to do something special).
*/ */
_connect_cb: function (req, _callback, raw) { _connect_cb: function (req, _callback, raw)
{
Strophe.info("_connect_cb was called"); Strophe.info("_connect_cb was called");
this.connected = true; this.connected = true;
...@@ -21402,7 +21463,8 @@ Strophe.Connection.prototype = { ...@@ -21402,7 +21463,8 @@ Strophe.Connection.prototype = {
* the code will fall back to legacy authentication. * the code will fall back to legacy authentication.
* *
*/ */
authenticate: function (matched) { authenticate: function (matched)
{
var i; var i;
// Sorting matched mechanisms according to priority. // Sorting matched mechanisms according to priority.
for (i = 0; i < matched.length - 1; ++i) { for (i = 0; i < matched.length - 1; ++i) {
...@@ -21508,7 +21570,8 @@ Strophe.Connection.prototype = { ...@@ -21508,7 +21570,8 @@ Strophe.Connection.prototype = {
* false to remove the handler. * false to remove the handler.
*/ */
/* jshint unused:false */ /* jshint unused:false */
_auth1_cb: function (elem) { _auth1_cb: function (elem)
{
// build plaintext auth iq // build plaintext auth iq
var iq = $iq({type: "set", id: "_auth_2"}) var iq = $iq({type: "set", id: "_auth_2"})
.c('query', {xmlns: Strophe.NS.AUTH}) .c('query', {xmlns: Strophe.NS.AUTH})
...@@ -21542,7 +21605,8 @@ Strophe.Connection.prototype = { ...@@ -21542,7 +21605,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* false to remove the handler. * false to remove the handler.
*/ */
_sasl_success_cb: function (elem) { _sasl_success_cb: function (elem)
{
if (this._sasl_data["server-signature"]) { if (this._sasl_data["server-signature"]) {
var serverSignature; var serverSignature;
var success = Base64.decode(Strophe.getText(elem)); var success = Base64.decode(Strophe.getText(elem));
...@@ -21609,7 +21673,8 @@ Strophe.Connection.prototype = { ...@@ -21609,7 +21673,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* false to remove the handler. * false to remove the handler.
*/ */
_sasl_auth1_cb: function (elem) { _sasl_auth1_cb: function (elem)
{
// save stream:features for future usage // save stream:features for future usage
this.features = elem; this.features = elem;
...@@ -21644,6 +21709,7 @@ Strophe.Connection.prototype = { ...@@ -21644,6 +21709,7 @@ Strophe.Connection.prototype = {
.tree()); .tree());
} }
} }
return false; return false;
}, },
...@@ -21656,7 +21722,8 @@ Strophe.Connection.prototype = { ...@@ -21656,7 +21722,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* false to remove the handler. * false to remove the handler.
*/ */
_sasl_bind_cb: function (elem) { _sasl_bind_cb: function (elem)
{
if (elem.getAttribute("type") == "error") { if (elem.getAttribute("type") == "error") {
Strophe.info("SASL binding failed."); Strophe.info("SASL binding failed.");
var conflict = elem.getElementsByTagName("conflict"), condition; var conflict = elem.getElementsByTagName("conflict"), condition;
...@@ -21707,7 +21774,8 @@ Strophe.Connection.prototype = { ...@@ -21707,7 +21774,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* false to remove the handler. * false to remove the handler.
*/ */
_sasl_session_cb: function (elem) { _sasl_session_cb: function (elem)
{
if (elem.getAttribute("type") == "result") { if (elem.getAttribute("type") == "result") {
this.authenticated = true; this.authenticated = true;
this._changeConnectStatus(Strophe.Status.CONNECTED, null); this._changeConnectStatus(Strophe.Status.CONNECTED, null);
...@@ -21716,6 +21784,7 @@ Strophe.Connection.prototype = { ...@@ -21716,6 +21784,7 @@ Strophe.Connection.prototype = {
this._changeConnectStatus(Strophe.Status.AUTHFAIL, null); this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
return false; return false;
} }
return false; return false;
}, },
...@@ -21729,7 +21798,8 @@ Strophe.Connection.prototype = { ...@@ -21729,7 +21798,8 @@ Strophe.Connection.prototype = {
* false to remove the handler. * false to remove the handler.
*/ */
/* jshint unused:false */ /* jshint unused:false */
_sasl_failure_cb: function (elem) { _sasl_failure_cb: function (elem)
{
// delete unneeded handlers // delete unneeded handlers
if (this._sasl_success_handler) { if (this._sasl_success_handler) {
this.deleteHandler(this._sasl_success_handler); this.deleteHandler(this._sasl_success_handler);
...@@ -21759,7 +21829,8 @@ Strophe.Connection.prototype = { ...@@ -21759,7 +21829,8 @@ Strophe.Connection.prototype = {
* Returns: * Returns:
* false to remove the handler. * false to remove the handler.
*/ */
_auth2_cb: function (elem) { _auth2_cb: function (elem)
{
if (elem.getAttribute("type") == "result") { if (elem.getAttribute("type") == "result") {
this.authenticated = true; this.authenticated = true;
this._changeConnectStatus(Strophe.Status.CONNECTED, null); this._changeConnectStatus(Strophe.Status.CONNECTED, null);
...@@ -21767,6 +21838,7 @@ Strophe.Connection.prototype = { ...@@ -21767,6 +21838,7 @@ Strophe.Connection.prototype = {
this._changeConnectStatus(Strophe.Status.AUTHFAIL, null); this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
this.disconnect('authentication failed'); this.disconnect('authentication failed');
} }
return false; return false;
}, },
...@@ -21781,7 +21853,8 @@ Strophe.Connection.prototype = { ...@@ -21781,7 +21853,8 @@ Strophe.Connection.prototype = {
* (Integer) period - The period of the handler. * (Integer) period - The period of the handler.
* (Function) handler - The callback function. * (Function) handler - The callback function.
*/ */
_addSysTimedHandler: function (period, handler) { _addSysTimedHandler: function (period, handler)
{
var thand = new Strophe.TimedHandler(period, handler); var thand = new Strophe.TimedHandler(period, handler);
thand.user = false; thand.user = false;
this.addTimeds.push(thand); this.addTimeds.push(thand);
...@@ -21823,8 +21896,6 @@ Strophe.Connection.prototype = { ...@@ -21823,8 +21896,6 @@ Strophe.Connection.prototype = {
{ {
Strophe.info("_onDisconnectTimeout was called"); Strophe.info("_onDisconnectTimeout was called");
this._changeConnectStatus(Strophe.Status.CONNTIMEOUT, null);
this._proto._onDisconnectTimeout(); this._proto._onDisconnectTimeout();
// actually disconnect // actually disconnect
...@@ -21883,10 +21954,7 @@ Strophe.Connection.prototype = { ...@@ -21883,10 +21954,7 @@ Strophe.Connection.prototype = {
// reactivate the timer only if connected // reactivate the timer only if connected
if (this.connected) { if (this.connected) {
// XXX: setTimeout should be called only with function expressions (23974bc1) this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
this._idleTimeout = setTimeout(function() {
this._onIdle();
}.bind(this), 100);
} }
} }
}; };
...@@ -21978,7 +22046,8 @@ Strophe.SASLMechanism.prototype = { ...@@ -21978,7 +22046,8 @@ Strophe.SASLMechanism.prototype = {
* Parameters: * Parameters:
* (Strophe.Connection) connection - Target Connection. * (Strophe.Connection) connection - Target Connection.
*/ */
onStart: function(connection) { onStart: function(connection)
{
this._connection = connection; this._connection = connection;
}, },
...@@ -22021,7 +22090,6 @@ Strophe.SASLMechanism.prototype = { ...@@ -22021,7 +22090,6 @@ Strophe.SASLMechanism.prototype = {
* Strophe.SASLPlain - SASL Plain authentication. * Strophe.SASLPlain - SASL Plain authentication.
* Strophe.SASLMD5 - SASL Digest-MD5 authentication * Strophe.SASLMD5 - SASL Digest-MD5 authentication
* Strophe.SASLSHA1 - SASL SCRAM-SHA1 authentication * Strophe.SASLSHA1 - SASL SCRAM-SHA1 authentication
* Strophe.SASLOAuthBearer - SASL OAuth Bearer authentication
*/ */
// Building SASL callbacks // Building SASL callbacks
...@@ -22236,32 +22304,6 @@ Strophe.SASLMD5.prototype.onChallenge = function(connection, challenge, test_cno ...@@ -22236,32 +22304,6 @@ Strophe.SASLMD5.prototype.onChallenge = function(connection, challenge, test_cno
Strophe.Connection.prototype.mechanisms[Strophe.SASLMD5.prototype.name] = Strophe.SASLMD5; Strophe.Connection.prototype.mechanisms[Strophe.SASLMD5.prototype.name] = Strophe.SASLMD5;
/** PrivateConstructor: SASLOAuthBearer
* SASL OAuth Bearer authentication.
*/
Strophe.SASLOAuthBearer = function() {};
Strophe.SASLOAuthBearer.prototype = new Strophe.SASLMechanism("OAUTHBEARER", true, 80);
Strophe.SASLOAuthBearer.test = function(connection) {
return connection.authcid !== null;
};
Strophe.SASLOAuthBearer.prototype.onChallenge = function(connection) {
var auth_str = 'n,a=';
auth_str = auth_str + connection.authzid;
auth_str = auth_str + ','
auth_str = auth_str + "\u0001";
auth_str = auth_str + 'auth=Bearer ';
auth_str = auth_str + connection.pass;
auth_str = auth_str + "\u0001";
auth_str = auth_str + "\u0001";
return utils.utf16to8(auth_str);
};
Strophe.Connection.prototype.mechanisms[Strophe.SASLOAuthBearer.prototype.name] = Strophe.SASLOAuthBearer;
return { return {
Strophe: Strophe, Strophe: Strophe,
$build: $build, $build: $build,
...@@ -22317,7 +22359,8 @@ return { ...@@ -22317,7 +22359,8 @@ return {
* (Integer) sends - The number of times this same request has been * (Integer) sends - The number of times this same request has been
* sent. * sent.
*/ */
Strophe.Request = function (elem, func, rid, sends) { Strophe.Request = function (elem, func, rid, sends)
{
this.id = ++Strophe._requestId; this.id = ++Strophe._requestId;
this.xmlData = elem; this.xmlData = elem;
this.data = Strophe.serialize(elem); this.data = Strophe.serialize(elem);
...@@ -22358,7 +22401,8 @@ Strophe.Request.prototype = { ...@@ -22358,7 +22401,8 @@ Strophe.Request.prototype = {
* Returns: * Returns:
* The DOM element tree of the response. * The DOM element tree of the response.
*/ */
getResponse: function () { getResponse: function ()
{
var node = null; var node = null;
if (this.xhr.responseXML && this.xhr.responseXML.documentElement) { if (this.xhr.responseXML && this.xhr.responseXML.documentElement) {
node = this.xhr.responseXML.documentElement; node = this.xhr.responseXML.documentElement;
...@@ -22386,7 +22430,8 @@ Strophe.Request.prototype = { ...@@ -22386,7 +22430,8 @@ Strophe.Request.prototype = {
* Returns: * Returns:
* A new XMLHttpRequest. * A new XMLHttpRequest.
*/ */
_newXHR: function () { _newXHR: function ()
{
var xhr = null; var xhr = null;
if (window.XMLHttpRequest) { if (window.XMLHttpRequest) {
xhr = new XMLHttpRequest(); xhr = new XMLHttpRequest();
...@@ -22462,7 +22507,8 @@ Strophe.Bosh.prototype = { ...@@ -22462,7 +22507,8 @@ Strophe.Bosh.prototype = {
* Returns: * Returns:
* A Strophe.Builder with a <body/> element. * A Strophe.Builder with a <body/> element.
*/ */
_buildBody: function () { _buildBody: function ()
{
var bodyWrap = $build('body', { var bodyWrap = $build('body', {
rid: this.rid++, rid: this.rid++,
xmlns: Strophe.NS.HTTPBIND xmlns: Strophe.NS.HTTPBIND
...@@ -22470,7 +22516,7 @@ Strophe.Bosh.prototype = { ...@@ -22470,7 +22516,7 @@ Strophe.Bosh.prototype = {
if (this.sid !== null) { if (this.sid !== null) {
bodyWrap.attrs({sid: this.sid}); bodyWrap.attrs({sid: this.sid});
} }
if (this._conn.options.keepalive && this._conn._sessionCachingSupported()) { if (this._conn.options.keepalive) {
this._cacheSession(); this._cacheSession();
} }
return bodyWrap; return bodyWrap;
...@@ -22481,13 +22527,12 @@ Strophe.Bosh.prototype = { ...@@ -22481,13 +22527,12 @@ Strophe.Bosh.prototype = {
* *
* This function is called by the reset function of the Strophe Connection * This function is called by the reset function of the Strophe Connection
*/ */
_reset: function () { _reset: function ()
{
this.rid = Math.floor(Math.random() * 4294967295); this.rid = Math.floor(Math.random() * 4294967295);
this.sid = null; this.sid = null;
this.errors = 0; this.errors = 0;
if (this._conn._sessionCachingSupported()) { window.sessionStorage.removeItem('strophe-bosh-session');
window.sessionStorage.removeItem('strophe-bosh-session');
}
this._conn.nextValidRid(this.rid); this._conn.nextValidRid(this.rid);
}, },
...@@ -22497,7 +22542,8 @@ Strophe.Bosh.prototype = { ...@@ -22497,7 +22542,8 @@ Strophe.Bosh.prototype = {
* *
* Creates and sends the Request that initializes the BOSH connection. * Creates and sends the Request that initializes the BOSH connection.
*/ */
_connect: function (wait, hold, route) { _connect: function (wait, hold, route)
{
this.wait = wait || this.wait; this.wait = wait || this.wait;
this.hold = hold || this.hold; this.hold = hold || this.hold;
this.errors = 0; this.errors = 0;
...@@ -22554,7 +22600,8 @@ Strophe.Bosh.prototype = { ...@@ -22554,7 +22600,8 @@ Strophe.Bosh.prototype = {
* (Integer) wind - The optional HTTBIND window value. This is the * (Integer) wind - The optional HTTBIND window value. This is the
* allowed range of request ids that are valid. The default is 5. * allowed range of request ids that are valid. The default is 5.
*/ */
_attach: function (jid, sid, rid, callback, wait, hold, wind) { _attach: function (jid, sid, rid, callback, wait, hold, wind)
{
this._conn.jid = jid; this._conn.jid = jid;
this.sid = sid; this.sid = sid;
this.rid = rid; this.rid = rid;
...@@ -22592,14 +22639,15 @@ Strophe.Bosh.prototype = { ...@@ -22592,14 +22639,15 @@ Strophe.Bosh.prototype = {
* (Integer) wind - The optional HTTBIND window value. This is the * (Integer) wind - The optional HTTBIND window value. This is the
* allowed range of request ids that are valid. The default is 5. * allowed range of request ids that are valid. The default is 5.
*/ */
_restore: function (jid, callback, wait, hold, wind) { _restore: function (jid, callback, wait, hold, wind)
{
var session = JSON.parse(window.sessionStorage.getItem('strophe-bosh-session')); var session = JSON.parse(window.sessionStorage.getItem('strophe-bosh-session'));
if (typeof session !== "undefined" && if (typeof session !== "undefined" &&
session !== null && session !== null &&
session.rid && session.rid &&
session.sid && session.sid &&
session.jid && session.jid &&
(typeof jid === "undefined" || jid === null || Strophe.getBareJidFromJid(session.jid) == Strophe.getBareJidFromJid(jid))) (typeof jid === "undefined" || jid === "null" || Strophe.getBareJidFromJid(session.jid) == Strophe.getBareJidFromJid(jid)))
{ {
this._conn.restored = true; this._conn.restored = true;
this._attach(session.jid, session.sid, session.rid, callback, wait, hold, wind); this._attach(session.jid, session.sid, session.rid, callback, wait, hold, wind);
...@@ -22615,7 +22663,8 @@ Strophe.Bosh.prototype = { ...@@ -22615,7 +22663,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Strophe.Request) bodyWrap - The received stanza. * (Strophe.Request) bodyWrap - The received stanza.
*/ */
_cacheSession: function () { _cacheSession: function ()
{
if (this._conn.authenticated) { if (this._conn.authenticated) {
if (this._conn.jid && this.rid && this.sid) { if (this._conn.jid && this.rid && this.sid) {
window.sessionStorage.setItem('strophe-bosh-session', JSON.stringify({ window.sessionStorage.setItem('strophe-bosh-session', JSON.stringify({
...@@ -22636,7 +22685,8 @@ Strophe.Bosh.prototype = { ...@@ -22636,7 +22685,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Strophe.Request) bodyWrap - The received stanza. * (Strophe.Request) bodyWrap - The received stanza.
*/ */
_connect_cb: function (bodyWrap) { _connect_cb: function (bodyWrap)
{
var typ = bodyWrap.getAttribute("type"); var typ = bodyWrap.getAttribute("type");
var cond, conflict; var cond, conflict;
if (typ !== null && typ == "terminate") { if (typ !== null && typ == "terminate") {
...@@ -22675,7 +22725,8 @@ Strophe.Bosh.prototype = { ...@@ -22675,7 +22725,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Request) pres - This stanza will be sent before disconnecting. * (Request) pres - This stanza will be sent before disconnecting.
*/ */
_disconnect: function (pres) { _disconnect: function (pres)
{
this._sendTerminate(pres); this._sendTerminate(pres);
}, },
...@@ -22684,12 +22735,11 @@ Strophe.Bosh.prototype = { ...@@ -22684,12 +22735,11 @@ Strophe.Bosh.prototype = {
* *
* Resets the SID and RID. * Resets the SID and RID.
*/ */
_doDisconnect: function () { _doDisconnect: function ()
{
this.sid = null; this.sid = null;
this.rid = Math.floor(Math.random() * 4294967295); this.rid = Math.floor(Math.random() * 4294967295);
if (this._conn._sessionCachingSupported()) { window.sessionStorage.removeItem('strophe-bosh-session');
window.sessionStorage.removeItem('strophe-bosh-session');
}
this._conn.nextValidRid(this.rid); this._conn.nextValidRid(this.rid);
}, },
...@@ -22700,7 +22750,8 @@ Strophe.Bosh.prototype = { ...@@ -22700,7 +22750,8 @@ Strophe.Bosh.prototype = {
* Returns: * Returns:
* True, if there are no Requests queued, False otherwise. * True, if there are no Requests queued, False otherwise.
*/ */
_emptyQueue: function () { _emptyQueue: function ()
{
return this._requests.length === 0; return this._requests.length === 0;
}, },
...@@ -22714,7 +22765,8 @@ Strophe.Bosh.prototype = { ...@@ -22714,7 +22765,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Integer) reqStatus - The request status. * (Integer) reqStatus - The request status.
*/ */
_hitError: function (reqStatus) { _hitError: function (reqStatus)
{
this.errors++; this.errors++;
Strophe.warn("request errored, status: " + reqStatus + Strophe.warn("request errored, status: " + reqStatus +
", number of errors: " + this.errors); ", number of errors: " + this.errors);
...@@ -22728,7 +22780,8 @@ Strophe.Bosh.prototype = { ...@@ -22728,7 +22780,8 @@ Strophe.Bosh.prototype = {
* Called on stream start/restart when no stream:features * Called on stream start/restart when no stream:features
* has been received and sends a blank poll request. * has been received and sends a blank poll request.
*/ */
_no_auth_received: function (_callback) { _no_auth_received: function (_callback)
{
if (_callback) { if (_callback) {
_callback = _callback.bind(this._conn); _callback = _callback.bind(this._conn);
} else { } else {
...@@ -22844,7 +22897,8 @@ Strophe.Bosh.prototype = { ...@@ -22844,7 +22897,8 @@ Strophe.Bosh.prototype = {
* (Function) func - The handler for the request. * (Function) func - The handler for the request.
* (Strophe.Request) req - The request that is changing readyState. * (Strophe.Request) req - The request that is changing readyState.
*/ */
_onRequestStateChange: function (func, req) { _onRequestStateChange: function (func, req)
{
Strophe.debug("request id " + req.id + Strophe.debug("request id " + req.id +
"." + req.sends + " state changed to " + "." + req.sends + " state changed to " +
req.xhr.readyState); req.xhr.readyState);
...@@ -22939,7 +22993,8 @@ Strophe.Bosh.prototype = { ...@@ -22939,7 +22993,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Integer) i - The index of the request in the queue. * (Integer) i - The index of the request in the queue.
*/ */
_processRequest: function (i) { _processRequest: function (i)
{
var self = this; var self = this;
var req = this._requests[i]; var req = this._requests[i];
var reqStatus = -1; var reqStatus = -1;
...@@ -23031,11 +23086,7 @@ Strophe.Bosh.prototype = { ...@@ -23031,11 +23086,7 @@ Strophe.Bosh.prototype = {
// expanding retry window // expanding retry window
var backoff = Math.min(Math.floor(Strophe.TIMEOUT * this.wait), var backoff = Math.min(Math.floor(Strophe.TIMEOUT * this.wait),
Math.pow(req.sends, 3)) * 1000; Math.pow(req.sends, 3)) * 1000;
setTimeout(sendFunc, backoff);
// XXX: setTimeout should be called only with function expressions (23974bc1)
setTimeout(function() {
sendFunc();
}, backoff);
} else { } else {
sendFunc(); sendFunc();
} }
...@@ -23066,7 +23117,8 @@ Strophe.Bosh.prototype = { ...@@ -23066,7 +23117,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Strophe.Request) req - The request to remove. * (Strophe.Request) req - The request to remove.
*/ */
_removeRequest: function (req) { _removeRequest: function (req)
{
Strophe.debug("removing request"); Strophe.debug("removing request");
var i; var i;
...@@ -23088,7 +23140,8 @@ Strophe.Bosh.prototype = { ...@@ -23088,7 +23140,8 @@ Strophe.Bosh.prototype = {
* Parameters: * Parameters:
* (Integer) i - The index of the request in the queue. * (Integer) i - The index of the request in the queue.
*/ */
_restartRequest: function (i) { _restartRequest: function (i)
{
var req = this._requests[i]; var req = this._requests[i];
if (req.dead === null) { if (req.dead === null) {
req.dead = new Date(); req.dead = new Date();
...@@ -23109,7 +23162,8 @@ Strophe.Bosh.prototype = { ...@@ -23109,7 +23162,8 @@ Strophe.Bosh.prototype = {
* Returns: * Returns:
* The stanza that was passed. * The stanza that was passed.
*/ */
_reqToData: function (req) { _reqToData: function (req)
{
try { try {
return req.getResponse(); return req.getResponse();
} catch (e) { } catch (e) {
...@@ -23125,7 +23179,8 @@ Strophe.Bosh.prototype = { ...@@ -23125,7 +23179,8 @@ Strophe.Bosh.prototype = {
* the BOSH server a terminate body and includes an unavailable * the BOSH server a terminate body and includes an unavailable
* presence if authentication has completed. * presence if authentication has completed.
*/ */
_sendTerminate: function (pres) { _sendTerminate: function (pres)
{
Strophe.info("_sendTerminate was called"); Strophe.info("_sendTerminate was called");
var body = this._buildBody().attrs({type: "terminate"}); var body = this._buildBody().attrs({type: "terminate"});
...@@ -23150,18 +23205,15 @@ Strophe.Bosh.prototype = { ...@@ -23150,18 +23205,15 @@ Strophe.Bosh.prototype = {
_send: function () { _send: function () {
clearTimeout(this._conn._idleTimeout); clearTimeout(this._conn._idleTimeout);
this._throttledRequestHandler(); this._throttledRequestHandler();
this._conn._idleTimeout = setTimeout(this._conn._onIdle.bind(this._conn), 100);
// XXX: setTimeout should be called only with function expressions (23974bc1)
this._conn._idleTimeout = setTimeout(function() {
this._onIdle();
}.bind(this._conn), 100);
}, },
/** PrivateFunction: _sendRestart /** PrivateFunction: _sendRestart
* *
* Send an xmpp:restart stanza. * Send an xmpp:restart stanza.
*/ */
_sendRestart: function () { _sendRestart: function ()
{
this._throttledRequestHandler(); this._throttledRequestHandler();
clearTimeout(this._conn._idleTimeout); clearTimeout(this._conn._idleTimeout);
}, },
...@@ -23173,7 +23225,8 @@ Strophe.Bosh.prototype = { ...@@ -23173,7 +23225,8 @@ Strophe.Bosh.prototype = {
* request ids overflow the connection window in the case that one * request ids overflow the connection window in the case that one
* request died. * request died.
*/ */
_throttledRequestHandler: function () { _throttledRequestHandler: function ()
{
if (!this._requests) { if (!this._requests) {
Strophe.debug("_throttledRequestHandler called with " + Strophe.debug("_throttledRequestHandler called with " +
"undefined requests"); "undefined requests");
...@@ -23288,7 +23341,8 @@ Strophe.Websocket.prototype = { ...@@ -23288,7 +23341,8 @@ Strophe.Websocket.prototype = {
* Returns: * Returns:
* A Strophe.Builder with a <stream> element. * A Strophe.Builder with a <stream> element.
*/ */
_buildStream: function () { _buildStream: function ()
{
return $build("open", { return $build("open", {
"xmlns": Strophe.NS.FRAMING, "xmlns": Strophe.NS.FRAMING,
"to": this._conn.domain, "to": this._conn.domain,
...@@ -23358,7 +23412,8 @@ Strophe.Websocket.prototype = { ...@@ -23358,7 +23412,8 @@ Strophe.Websocket.prototype = {
* This function is called by the reset function of the Strophe Connection. * This function is called by the reset function of the Strophe Connection.
* Is not needed by WebSockets. * Is not needed by WebSockets.
*/ */
_reset: function () { _reset: function ()
{
return; return;
}, },
...@@ -23480,7 +23535,8 @@ Strophe.Websocket.prototype = { ...@@ -23480,7 +23535,8 @@ Strophe.Websocket.prototype = {
* Parameters: * Parameters:
* (Request) pres - This stanza will be sent before disconnecting. * (Request) pres - This stanza will be sent before disconnecting.
*/ */
_disconnect: function (pres) { _disconnect: function (pres)
{
if (this.socket && this.socket.readyState !== WebSocket.CLOSED) { if (this.socket && this.socket.readyState !== WebSocket.CLOSED) {
if (pres) { if (pres) {
this._conn.send(pres); this._conn.send(pres);
...@@ -23503,7 +23559,8 @@ Strophe.Websocket.prototype = { ...@@ -23503,7 +23559,8 @@ Strophe.Websocket.prototype = {
* *
* Just closes the Socket for WebSockets * Just closes the Socket for WebSockets
*/ */
_doDisconnect: function () { _doDisconnect: function ()
{
Strophe.info("WebSockets _doDisconnect was called"); Strophe.info("WebSockets _doDisconnect was called");
this._closeSocket(); this._closeSocket();
}, },
...@@ -23512,7 +23569,8 @@ Strophe.Websocket.prototype = { ...@@ -23512,7 +23569,8 @@ Strophe.Websocket.prototype = {
* _Private_ helper function to wrap a stanza in a <stream> tag. * _Private_ helper function to wrap a stanza in a <stream> tag.
* This is used so Strophe can process stanzas from WebSockets like BOSH * This is used so Strophe can process stanzas from WebSockets like BOSH
*/ */
_streamWrap: function (stanza) { _streamWrap: function (stanza)
{
return "<wrapper>" + stanza + '</wrapper>'; return "<wrapper>" + stanza + '</wrapper>';
}, },
...@@ -23522,7 +23580,8 @@ Strophe.Websocket.prototype = { ...@@ -23522,7 +23580,8 @@ Strophe.Websocket.prototype = {
* *
* Closes the socket if it is still open and deletes it * Closes the socket if it is still open and deletes it
*/ */
_closeSocket: function () { _closeSocket: function ()
{
if (this.socket) { try { if (this.socket) { try {
this.socket.close(); this.socket.close();
} catch (e) {} } } catch (e) {} }
...@@ -23535,7 +23594,8 @@ Strophe.Websocket.prototype = { ...@@ -23535,7 +23594,8 @@ Strophe.Websocket.prototype = {
* Returns: * Returns:
* True, because WebSocket messages are send immediately after queueing. * True, because WebSocket messages are send immediately after queueing.
*/ */
_emptyQueue: function () { _emptyQueue: function ()
{
return true; return true;
}, },
...@@ -23546,7 +23606,7 @@ Strophe.Websocket.prototype = { ...@@ -23546,7 +23606,7 @@ Strophe.Websocket.prototype = {
*/ */
_onClose: function() { _onClose: function() {
if(this._conn.connected && !this._conn.disconnecting) { if(this._conn.connected && !this._conn.disconnecting) {
Strophe.error("Websocket closed unexpectedly"); Strophe.error("Websocket closed unexcectedly");
this._conn._doDisconnect(); this._conn._doDisconnect();
} else { } else {
Strophe.info("Websocket closed"); Strophe.info("Websocket closed");
...@@ -23558,7 +23618,8 @@ Strophe.Websocket.prototype = { ...@@ -23558,7 +23618,8 @@ Strophe.Websocket.prototype = {
* Called on stream start/restart when no stream:features * Called on stream start/restart when no stream:features
* has been received. * has been received.
*/ */
_no_auth_received: function (_callback) { _no_auth_received: function (_callback)
{
Strophe.error("Server did not send any auth methods"); Strophe.error("Server did not send any auth methods");
this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "Server did not send any auth methods"); this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "Server did not send any auth methods");
if (_callback) { if (_callback) {
...@@ -23621,22 +23682,11 @@ Strophe.Websocket.prototype = { ...@@ -23621,22 +23682,11 @@ Strophe.Websocket.prototype = {
/** PrivateFunction: _onMessage /** PrivateFunction: _onMessage
* _Private_ function to handle websockets messages. * _Private_ function to handle websockets messages.
* *
* This function parses each of the messages as if they are full documents. * This function parses each of the messages as if they are full documents. [TODO : We may actually want to use a SAX Push parser].
* [TODO : We may actually want to use a SAX Push parser].
* *
* Since all XMPP traffic starts with * Since all XMPP traffic starts with "<stream:stream version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='3697395463' from='SERVER'>"
* <stream:stream version='1.0' * The first stanza will always fail to be parsed...
* xml:lang='en' * Addtionnaly, the seconds stanza will always be a <stream:features> with the stream NS defined in the previous stanza... so we need to 'force' the inclusion of the NS in this stanza!
* xmlns='jabber:client'
* xmlns:stream='http://etherx.jabber.org/streams'
* id='3697395463'
* from='SERVER'>
*
* The first stanza will always fail to be parsed.
*
* Additionally, the seconds stanza will always be <stream:features> with
* the stream NS defined in the previous stanza, so we need to 'force'
* the inclusion of the NS in this stanza.
* *
* Parameters: * Parameters:
* (string) message - The websocket message. * (string) message - The websocket message.
...@@ -23655,6 +23705,7 @@ Strophe.Websocket.prototype = { ...@@ -23655,6 +23705,7 @@ Strophe.Websocket.prototype = {
} else if (message.data.search("<open ") === 0) { } else if (message.data.search("<open ") === 0) {
// This handles stream restarts // This handles stream restarts
elem = new DOMParser().parseFromString(message.data, "text/xml").documentElement; elem = new DOMParser().parseFromString(message.data, "text/xml").documentElement;
if (!this._handleStreamStart(elem)) { if (!this._handleStreamStart(elem)) {
return; return;
} }
...@@ -23706,7 +23757,8 @@ Strophe.Websocket.prototype = { ...@@ -23706,7 +23757,8 @@ Strophe.Websocket.prototype = {
* Returns: * Returns:
* The stanza that was passed. * The stanza that was passed.
*/ */
_reqToData: function (stanza) { _reqToData: function (stanza)
{
return stanza; return stanza;
}, },
...@@ -23723,7 +23775,8 @@ Strophe.Websocket.prototype = { ...@@ -23723,7 +23775,8 @@ Strophe.Websocket.prototype = {
* *
* Send an xmpp:restart stanza. * Send an xmpp:restart stanza.
*/ */
_sendRestart: function () { _sendRestart: function ()
{
clearTimeout(this._conn._idleTimeout); clearTimeout(this._conn._idleTimeout);
this._conn._onIdle.bind(this._conn)(); this._conn._onIdle.bind(this._conn)();
} }
...@@ -23938,9 +23991,8 @@ return Strophe; ...@@ -23938,9 +23991,8 @@ return Strophe;
})); }));
/** /**
* @license RequireJS text 2.0.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. * @license text 2.0.15 Copyright jQuery Foundation and other contributors.
* Available via the MIT or new BSD license. * Released under MIT license, http://github.com/requirejs/text/LICENSE
* see: http://github.com/requirejs/text for details
*/ */
/*jslint regexp: true */ /*jslint regexp: true */
/*global require, XMLHttpRequest, ActiveXObject, /*global require, XMLHttpRequest, ActiveXObject,
...@@ -23961,8 +24013,26 @@ define('text',['module'], function (module) { ...@@ -23961,8 +24013,26 @@ define('text',['module'], function (module) {
buildMap = {}, buildMap = {},
masterConfig = (module.config && module.config()) || {}; masterConfig = (module.config && module.config()) || {};
function useDefault(value, defaultValue) {
return value === undefined || value === '' ? defaultValue : value;
}
//Allow for default ports for http and https.
function isSamePort(protocol1, port1, protocol2, port2) {
if (port1 === port2) {
return true;
} else if (protocol1 === protocol2) {
if (protocol1 === 'http') {
return useDefault(port1, '80') === useDefault(port2, '80');
} else if (protocol1 === 'https') {
return useDefault(port1, '443') === useDefault(port2, '443');
}
}
return false;
}
text = { text = {
version: '2.0.14', version: '2.0.15',
strip: function (content) { strip: function (content) {
//Strips <?xml ...?> declarations so that external SVG and XML //Strips <?xml ...?> declarations so that external SVG and XML
...@@ -24080,7 +24150,7 @@ define('text',['module'], function (module) { ...@@ -24080,7 +24150,7 @@ define('text',['module'], function (module) {
return (!uProtocol || uProtocol === protocol) && return (!uProtocol || uProtocol === protocol) &&
(!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) && (!uHostName || uHostName.toLowerCase() === hostname.toLowerCase()) &&
((!uPort && !uHostName) || uPort === port); ((!uPort && !uHostName) || isSamePort(uProtocol, uPort, protocol, port));
}, },
finishLoad: function (name, strip, content, onLoad) { finishLoad: function (name, strip, content, onLoad) {
...@@ -33666,7 +33736,8 @@ define('text!zh',[],function () { return '{\n "domain": "converse",\n "local ...@@ -33666,7 +33736,8 @@ define('text!zh',[],function () { return '{\n "domain": "converse",\n "local
* fetching the roster we are ready to receive presence * fetching the roster we are ready to receive presence
* updates from our contacts. * updates from our contacts.
*/ */
converse.roster.fetchFromServer(converse.xmppstatus.sendPresence); converse.roster.fetchFromServer(
converse.xmppstatus.sendPresence.bind(converse.xmppstatus));
} else if (converse.send_initial_presence) { } else if (converse.send_initial_presence) {
/* We're not going to fetch the roster again because we have /* We're not going to fetch the roster again because we have
* it already cached in sessionStorage, but we still need to * it already cached in sessionStorage, but we still need to
...@@ -48,9 +48,9 @@ copyright = u'2014, JC Brand' ...@@ -48,9 +48,9 @@ copyright = u'2014, JC Brand'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '1.0.1' version = '1.0.2'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '1.0.1' release = '1.0.2'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.4\n" "Project-Id-Version: Converse.js 0.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:34+0000\n" "PO-Revision-Date: 2016-04-07 10:34+0000\n"
"Last-Translator: JC Brand <jc@opkode.com>\n" "Last-Translator: JC Brand <jc@opkode.com>\n"
"Language-Team: Afrikaans\n" "Language-Team: Afrikaans\n"
...@@ -983,35 +983,35 @@ msgstr "Geselserig" ...@@ -983,35 +983,35 @@ msgstr "Geselserig"
msgid "Extended Away" msgid "Extended Away"
msgstr "Weg vir langer" msgstr "Weg vir langer"
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Klik om hierdie kontak te verwyder" msgstr "Klik om hierdie kontak te verwyder"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Klik om hierdie kontakversoek te aanvaar" msgstr "Klik om hierdie kontakversoek te aanvaar"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Klik om hierdie kontakversoek te weier" msgstr "Klik om hierdie kontakversoek te weier"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Klik om met hierdie kontak te klets" msgstr "Klik om met hierdie kontak te klets"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "Naam" msgstr "Naam"
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Is u seker u wil hierdie gespreksmaat verwyder?" msgstr "Is u seker u wil hierdie gespreksmaat verwyder?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "Jammer, 'n fout het voorgekom tydens die verwydering van " msgstr "Jammer, 'n fout het voorgekom tydens die verwydering van "
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Is u seker dat u hierdie persoon se versoek wil afkeur?" msgstr "Is u seker dat u hierdie persoon se versoek wil afkeur?"
......
...@@ -6,7 +6,7 @@ msgid "" ...@@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.4\n" "Project-Id-Version: Converse.js 0.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-01-25 17:25+0100\n" "PO-Revision-Date: 2016-01-25 17:25+0100\n"
"Last-Translator: Ruben Mansilla <ramansilla@gmail.com>\n" "Last-Translator: Ruben Mansilla <ramansilla@gmail.com>\n"
"Language-Team: CA <product@spamina.com>\n" "Language-Team: CA <product@spamina.com>\n"
...@@ -995,35 +995,35 @@ msgstr "" ...@@ -995,35 +995,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Feu clic per eliminar aquest contacte" msgstr "Feu clic per eliminar aquest contacte"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Feu clic per acceptar aquesta sol·licitud de contacte" msgstr "Feu clic per acceptar aquesta sol·licitud de contacte"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Feu clic per rebutjar aquesta sol·licitud de contacte" msgstr "Feu clic per rebutjar aquesta sol·licitud de contacte"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Feu clic per conversar amb aquest contacte" msgstr "Feu clic per conversar amb aquest contacte"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Segur que voleu eliminar aquest contacte?" msgstr "Segur que voleu eliminar aquest contacte?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "S'ha produït un error en intentar eliminar " msgstr "S'ha produït un error en intentar eliminar "
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Segur que voleu rebutjar aquesta sol·licitud de contacte?" msgstr "Segur que voleu rebutjar aquesta sol·licitud de contacte?"
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.10.1\n" "Project-Id-Version: Converse.js 0.10.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:16+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
...@@ -938,34 +938,34 @@ msgstr "" ...@@ -938,34 +938,34 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "" msgstr ""
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "" msgstr ""
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "" msgstr ""
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "" msgstr ""
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "" msgstr ""
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "" msgstr ""
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.4\n" "Project-Id-Version: Converse.js 0.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:20+0000\n" "PO-Revision-Date: 2016-04-07 10:20+0000\n"
"Last-Translator: JC Brand <jc@opkode.com>\n" "Last-Translator: JC Brand <jc@opkode.com>\n"
"Language-Team: German\n" "Language-Team: German\n"
...@@ -962,35 +962,35 @@ msgstr "" ...@@ -962,35 +962,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Hier klicken um diesen Kontakt zu entfernen" msgstr "Hier klicken um diesen Kontakt zu entfernen"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Hier klicken um diese Kontaktanfrage zu akzeptieren" msgstr "Hier klicken um diese Kontaktanfrage zu akzeptieren"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Hier klicken um diese Kontaktanfrage zu abzulehnen" msgstr "Hier klicken um diese Kontaktanfrage zu abzulehnen"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Hier klicken um mit diesem Kontakt zu chatten" msgstr "Hier klicken um mit diesem Kontakt zu chatten"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Wollen Sie diesen Kontakt wirklich entfernen?" msgstr "Wollen Sie diesen Kontakt wirklich entfernen?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Wollen Sie diese Kontaktanfrage wirklich ablehnen?" msgstr "Wollen Sie diese Kontaktanfrage wirklich ablehnen?"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.4\n" "Project-Id-Version: Converse.js 0.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2015-05-01 12:37+0200\n" "PO-Revision-Date: 2015-05-01 12:37+0200\n"
"Last-Translator: JC Brand <jc@opkode.com>\n" "Last-Translator: JC Brand <jc@opkode.com>\n"
"Language-Team: English\n" "Language-Team: English\n"
...@@ -946,35 +946,35 @@ msgstr "" ...@@ -946,35 +946,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Click to remove this contact" msgstr "Click to remove this contact"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "" msgstr ""
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "" msgstr ""
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Click to chat with this contact" msgstr "Click to chat with this contact"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "" msgstr ""
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "" msgstr ""
......
...@@ -6,7 +6,7 @@ msgid "" ...@@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.4\n" "Project-Id-Version: Converse.js 0.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:21+0000\n" "PO-Revision-Date: 2016-04-07 10:21+0000\n"
"Last-Translator: Javier Lopez <m@javier.io>\n" "Last-Translator: Javier Lopez <m@javier.io>\n"
"Language-Team: ES <LL@li.org>\n" "Language-Team: ES <LL@li.org>\n"
...@@ -1009,37 +1009,37 @@ msgstr "" ...@@ -1009,37 +1009,37 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Haga click para eliminar este contacto" msgstr "Haga click para eliminar este contacto"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
#, fuzzy #, fuzzy
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Haga click para eliminar este contacto" msgstr "Haga click para eliminar este contacto"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
#, fuzzy #, fuzzy
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Haga click para eliminar este contacto" msgstr "Haga click para eliminar este contacto"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Haga click para conversar con este contacto" msgstr "Haga click para conversar con este contacto"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "¿Esta seguro de querer eliminar este contacto?" msgstr "¿Esta seguro de querer eliminar este contacto?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
#, fuzzy #, fuzzy
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "¿Esta seguro de querer eliminar este contacto?" msgstr "¿Esta seguro de querer eliminar este contacto?"
......
...@@ -5,7 +5,7 @@ msgid "" ...@@ -5,7 +5,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.4\n" "Project-Id-Version: Converse.js 0.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:22+0000\n" "PO-Revision-Date: 2016-04-07 10:22+0000\n"
"Language-Team: FR <LL@li.org>\n" "Language-Team: FR <LL@li.org>\n"
"Language: fr\n" "Language: fr\n"
...@@ -990,35 +990,35 @@ msgstr "" ...@@ -990,35 +990,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Cliquez pour supprimer ce contact" msgstr "Cliquez pour supprimer ce contact"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Cliquez pour accepter la demande de ce contact" msgstr "Cliquez pour accepter la demande de ce contact"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Cliquez pour refuser la demande de ce contact" msgstr "Cliquez pour refuser la demande de ce contact"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Cliquez pour discuter avec ce contact" msgstr "Cliquez pour discuter avec ce contact"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Êtes-vous sûr de vouloir supprimer ce contact?" msgstr "Êtes-vous sûr de vouloir supprimer ce contact?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Êtes-vous sûr de vouloir refuser la demande de ce contact?" msgstr "Êtes-vous sûr de vouloir refuser la demande de ce contact?"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.8.8\n" "Project-Id-Version: Converse.js 0.8.8\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:21+0000\n" "PO-Revision-Date: 2016-04-07 10:21+0000\n"
"Last-Translator: GreenLunar <https://github.com/GreenLunar>\n" "Last-Translator: GreenLunar <https://github.com/GreenLunar>\n"
"Language-Team: Rahut <http://sourceforge.net/projects/rahut/>\n" "Language-Team: Rahut <http://sourceforge.net/projects/rahut/>\n"
...@@ -983,35 +983,35 @@ msgstr "" ...@@ -983,35 +983,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "לחץ כדי להסיר את איש קשר זה" msgstr "לחץ כדי להסיר את איש קשר זה"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "לחץ כדי לקבל את בקשת איש קשר זה" msgstr "לחץ כדי לקבל את בקשת איש קשר זה"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "לחץ כדי לסרב את בקשת איש קשר זה" msgstr "לחץ כדי לסרב את בקשת איש קשר זה"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "לחץ כדי לשוחח עם איש קשר זה" msgstr "לחץ כדי לשוחח עם איש קשר זה"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "שם" msgstr "שם"
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "האם אתה בטוח כי ברצונך להסיר את איש קשר זה?" msgstr "האם אתה בטוח כי ברצונך להסיר את איש קשר זה?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "מצטערים, היתה שגיאה במהלך ניסיון להסיר את " msgstr "מצטערים, היתה שגיאה במהלך ניסיון להסיר את "
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "האם אתה בטוח כי ברצונך לסרב את בקשת איש קשר זה?" msgstr "האם אתה בטוח כי ברצונך לסרב את בקשת איש קשר זה?"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.8.8\n" "Project-Id-Version: Converse.js 0.8.8\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:23+0000\n" "PO-Revision-Date: 2016-04-07 10:23+0000\n"
"Last-Translator: Meskó Balázs <meskobalazs@gmail.com>\n" "Last-Translator: Meskó Balázs <meskobalazs@gmail.com>\n"
"Language-Team: Hungarian\n" "Language-Team: Hungarian\n"
...@@ -978,35 +978,35 @@ msgstr "" ...@@ -978,35 +978,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Partner törlése" msgstr "Partner törlése"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Partner felvételének elfogadása" msgstr "Partner felvételének elfogadása"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Partner felvételének megtagadása" msgstr "Partner felvételének megtagadása"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Csevegés indítása ezzel a partnerünkkel" msgstr "Csevegés indítása ezzel a partnerünkkel"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "Név" msgstr "Név"
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Valóban törölni szeretné a csevegőpartnerét?" msgstr "Valóban törölni szeretné a csevegőpartnerét?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "Sajnáljuk, hiba történt a törlés során" msgstr "Sajnáljuk, hiba történt a törlés során"
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Valóban elutasítja ezt a partnerkérelmet?" msgstr "Valóban elutasítja ezt a partnerkérelmet?"
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.7.0\n" "Project-Id-Version: Converse.js 0.7.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2014-01-25 21:30+0700\n" "PO-Revision-Date: 2014-01-25 21:30+0700\n"
"Last-Translator: Priyadi Iman Nurcahyo <priyadi@priyadi.net>\n" "Last-Translator: Priyadi Iman Nurcahyo <priyadi@priyadi.net>\n"
"Language-Team: Bahasa Indonesia\n" "Language-Team: Bahasa Indonesia\n"
...@@ -1005,38 +1005,38 @@ msgstr "" ...@@ -1005,38 +1005,38 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Klik untuk menghapus teman ini" msgstr "Klik untuk menghapus teman ini"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
#, fuzzy #, fuzzy
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Klik untuk menghapus teman ini" msgstr "Klik untuk menghapus teman ini"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
#, fuzzy #, fuzzy
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Klik untuk menghapus teman ini" msgstr "Klik untuk menghapus teman ini"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Klik untuk mulai perbinjangan dengan teman ini" msgstr "Klik untuk mulai perbinjangan dengan teman ini"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
#, fuzzy #, fuzzy
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Klik untuk menghapus teman ini" msgstr "Klik untuk menghapus teman ini"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
#, fuzzy #, fuzzy
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Klik untuk menghapus teman ini" msgstr "Klik untuk menghapus teman ini"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.4\n" "Project-Id-Version: Converse.js 0.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:23+0000\n" "PO-Revision-Date: 2016-04-07 10:23+0000\n"
"Last-Translator: Fabio Bas <ctrlaltca@gmail.com>\n" "Last-Translator: Fabio Bas <ctrlaltca@gmail.com>\n"
"Language-Team: Italian\n" "Language-Team: Italian\n"
...@@ -965,35 +965,35 @@ msgstr "" ...@@ -965,35 +965,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Clicca per rimuovere questo contatto" msgstr "Clicca per rimuovere questo contatto"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Clicca per accettare questa richiesta di contatto" msgstr "Clicca per accettare questa richiesta di contatto"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Clicca per rifiutare questa richiesta di contatto" msgstr "Clicca per rifiutare questa richiesta di contatto"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Clicca per parlare con questo contatto" msgstr "Clicca per parlare con questo contatto"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "Nome" msgstr "Nome"
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Sei sicuro di voler rimuovere questo contatto?" msgstr "Sei sicuro di voler rimuovere questo contatto?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "Si è verificato un errore durante il tentativo di rimozione" msgstr "Si è verificato un errore durante il tentativo di rimozione"
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Sei sicuro dirifiutare questa richiesta di contatto?" msgstr "Sei sicuro dirifiutare questa richiesta di contatto?"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.4\n" "Project-Id-Version: Converse.js 0.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2014-01-07 11:32+0900\n" "PO-Revision-Date: 2014-01-07 11:32+0900\n"
"Last-Translator: Mako N <mako@pasero.net>\n" "Last-Translator: Mako N <mako@pasero.net>\n"
"Language-Team: Language JA\n" "Language-Team: Language JA\n"
...@@ -996,38 +996,38 @@ msgstr "" ...@@ -996,38 +996,38 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "クリックしてこの相手先を削除" msgstr "クリックしてこの相手先を削除"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
#, fuzzy #, fuzzy
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "クリックしてこの相手先を削除" msgstr "クリックしてこの相手先を削除"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
#, fuzzy #, fuzzy
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "クリックしてこの相手先を削除" msgstr "クリックしてこの相手先を削除"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "クリックしてこの相手先とチャット" msgstr "クリックしてこの相手先とチャット"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
#, fuzzy #, fuzzy
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "クリックしてこの相手先を削除" msgstr "クリックしてこの相手先を削除"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
#, fuzzy #, fuzzy
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "クリックしてこの相手先を削除" msgstr "クリックしてこの相手先を削除"
......
...@@ -2,7 +2,7 @@ msgid "" ...@@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse JS 0.8.6\n" "Project-Id-Version: Converse JS 0.8.6\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:23+0000\n" "PO-Revision-Date: 2016-04-07 10:23+0000\n"
"Last-Translator: Andreas Lorentsen <andreas.lorentsen@gmail.com>\n" "Last-Translator: Andreas Lorentsen <andreas.lorentsen@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
...@@ -995,35 +995,35 @@ msgstr "" ...@@ -995,35 +995,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Klikk for å fjerne denne kontakten" msgstr "Klikk for å fjerne denne kontakten"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Klikk for å Godta denne kontaktforespørselen" msgstr "Klikk for å Godta denne kontaktforespørselen"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Klikk for å avslå denne kontaktforespørselen" msgstr "Klikk for å avslå denne kontaktforespørselen"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Klikk for å chatte med denne kontakten" msgstr "Klikk for å chatte med denne kontakten"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Er du sikker på at du vil fjerne denne kontakten?" msgstr "Er du sikker på at du vil fjerne denne kontakten?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Er du sikker på at du vil avslå denne kontaktforespørselen?" msgstr "Er du sikker på at du vil avslå denne kontaktforespørselen?"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.4\n" "Project-Id-Version: Converse.js 0.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:21+0000\n" "PO-Revision-Date: 2016-04-07 10:21+0000\n"
"Last-Translator: Maarten Kling <maarten@fourdigits.nl>\n" "Last-Translator: Maarten Kling <maarten@fourdigits.nl>\n"
"Language-Team: Dutch\n" "Language-Team: Dutch\n"
...@@ -977,38 +977,38 @@ msgstr "" ...@@ -977,38 +977,38 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Klik om contact te verwijderen" msgstr "Klik om contact te verwijderen"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
#, fuzzy #, fuzzy
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Klik om contact te verwijderen" msgstr "Klik om contact te verwijderen"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
#, fuzzy #, fuzzy
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Klik om contact te verwijderen" msgstr "Klik om contact te verwijderen"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Klik om te chatten met contact" msgstr "Klik om te chatten met contact"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
#, fuzzy #, fuzzy
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Klik om contact te verwijderen" msgstr "Klik om contact te verwijderen"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
#, fuzzy #, fuzzy
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Klik om contact te verwijderen" msgstr "Klik om contact te verwijderen"
......
...@@ -8,7 +8,7 @@ msgid "" ...@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.9.6\n" "Project-Id-Version: Converse.js 0.9.6\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:22+0000\n" "PO-Revision-Date: 2016-04-07 10:22+0000\n"
"Last-Translator: Serge Victor <converse.js@random.re>\n" "Last-Translator: Serge Victor <converse.js@random.re>\n"
"Language-Team: Polish\n" "Language-Team: Polish\n"
...@@ -986,35 +986,35 @@ msgstr "" ...@@ -986,35 +986,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Kliknij aby usunąć kontakt" msgstr "Kliknij aby usunąć kontakt"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Klknij aby zaakceptować życzenie nawiązania kontaktu" msgstr "Klknij aby zaakceptować życzenie nawiązania kontaktu"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Kliknij aby odrzucić życzenie nawiązania kontaktu" msgstr "Kliknij aby odrzucić życzenie nawiązania kontaktu"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Kliknij aby porozmawiać z kontaktem" msgstr "Kliknij aby porozmawiać z kontaktem"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "Nazwa" msgstr "Nazwa"
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Czy potwierdzasz zamiar usnunięcia tego kontaktu?" msgstr "Czy potwierdzasz zamiar usnunięcia tego kontaktu?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "Wystąpił błąd w trakcie próby usunięcia " msgstr "Wystąpił błąd w trakcie próby usunięcia "
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Czy potwierdzasz odrzucenie chęci nawiązania kontaktu?" msgstr "Czy potwierdzasz odrzucenie chęci nawiązania kontaktu?"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.6.3\n" "Project-Id-Version: Converse.js 0.6.3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:23+0000\n" "PO-Revision-Date: 2016-04-07 10:23+0000\n"
"Last-Translator: Alan Meira <alan@engarte.com>\n" "Last-Translator: Alan Meira <alan@engarte.com>\n"
"Language-Team: Brazilian Portuguese\n" "Language-Team: Brazilian Portuguese\n"
...@@ -1010,38 +1010,38 @@ msgstr "" ...@@ -1010,38 +1010,38 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Clique para remover o contato" msgstr "Clique para remover o contato"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
#, fuzzy #, fuzzy
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Clique para remover o contato" msgstr "Clique para remover o contato"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
#, fuzzy #, fuzzy
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Clique para remover o contato" msgstr "Clique para remover o contato"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Clique para conversar com o contato" msgstr "Clique para conversar com o contato"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
#, fuzzy #, fuzzy
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Clique para remover o contato" msgstr "Clique para remover o contato"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
#, fuzzy #, fuzzy
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Clique para remover o contato" msgstr "Clique para remover o contato"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.10\n" "Project-Id-Version: Converse.js 0.10\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:22+0000\n" "PO-Revision-Date: 2016-04-07 10:22+0000\n"
"Last-Translator: Laconic Team <info@laconic.website>\n" "Last-Translator: Laconic Team <info@laconic.website>\n"
"Language-Team: Laconic Team <info@laconic.website>\n" "Language-Team: Laconic Team <info@laconic.website>\n"
...@@ -983,35 +983,35 @@ msgstr "" ...@@ -983,35 +983,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Удалить контакт" msgstr "Удалить контакт"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Кликните, чтобы принять запрос этого контакта" msgstr "Кликните, чтобы принять запрос этого контакта"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Кликните, чтобы отклонить запрос этого контакта" msgstr "Кликните, чтобы отклонить запрос этого контакта"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Кликните, чтобы начать общение" msgstr "Кликните, чтобы начать общение"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "Имя" msgstr "Имя"
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Вы уверены, что хотите удалить этот контакт?" msgstr "Вы уверены, что хотите удалить этот контакт?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "Возникла ошибка при удалении " msgstr "Возникла ошибка при удалении "
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Вы уверены, что хотите отклонить запрос от этого контакта?" msgstr "Вы уверены, что хотите отклонить запрос от этого контакта?"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.7.0\n" "Project-Id-Version: Converse.js 0.7.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:22+0000\n" "PO-Revision-Date: 2016-04-07 10:22+0000\n"
"Last-Translator: Andriy Kopystyansky <anri@polynet.lviv.ua>\n" "Last-Translator: Andriy Kopystyansky <anri@polynet.lviv.ua>\n"
"Language-Team: Ukrainian\n" "Language-Team: Ukrainian\n"
...@@ -984,35 +984,35 @@ msgstr "" ...@@ -984,35 +984,35 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "Клацніть, щоб видалити цей контакт" msgstr "Клацніть, щоб видалити цей контакт"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "Клацніть, щоб прийняти цей запит контакту" msgstr "Клацніть, щоб прийняти цей запит контакту"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "Клацніть, щоб відхилити цей запит контакту" msgstr "Клацніть, щоб відхилити цей запит контакту"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "Клацніть, щоб почати розмову з цим контактом" msgstr "Клацніть, щоб почати розмову з цим контактом"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "Ви впевнені, що хочете видалити цей контакт?" msgstr "Ви впевнені, що хочете видалити цей контакт?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "Ви впевнені, що хочете відхилити цей запит контакту?" msgstr "Ви впевнені, що хочете відхилити цей запит контакту?"
......
...@@ -7,7 +7,7 @@ msgid "" ...@@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Converse.js 0.4\n" "Project-Id-Version: Converse.js 0.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-24 08:15+0000\n" "POT-Creation-Date: 2016-05-24 08:43+0000\n"
"PO-Revision-Date: 2016-04-07 10:23+0000\n" "PO-Revision-Date: 2016-04-07 10:23+0000\n"
"Last-Translator: Huxisuz Hu <huxisuz@gmail.com>\n" "Last-Translator: Huxisuz Hu <huxisuz@gmail.com>\n"
"Language-Team: Language zh\n" "Language-Team: Language zh\n"
...@@ -992,38 +992,38 @@ msgstr "" ...@@ -992,38 +992,38 @@ msgstr ""
msgid "Extended Away" msgid "Extended Away"
msgstr "" msgstr ""
#: src/converse-rosterview.js:575 src/converse-rosterview.js:596 #: src/converse-rosterview.js:576 src/converse-rosterview.js:597
msgid "Click to remove this contact" msgid "Click to remove this contact"
msgstr "点击移除联系人" msgstr "点击移除联系人"
#: src/converse-rosterview.js:583 #: src/converse-rosterview.js:584
#, fuzzy #, fuzzy
msgid "Click to accept this contact request" msgid "Click to accept this contact request"
msgstr "点击移除联系人" msgstr "点击移除联系人"
#: src/converse-rosterview.js:584 #: src/converse-rosterview.js:585
#, fuzzy #, fuzzy
msgid "Click to decline this contact request" msgid "Click to decline this contact request"
msgstr "点击移除联系人" msgstr "点击移除联系人"
#: src/converse-rosterview.js:595 #: src/converse-rosterview.js:596
msgid "Click to chat with this contact" msgid "Click to chat with this contact"
msgstr "点击与对方交谈" msgstr "点击与对方交谈"
#: src/converse-rosterview.js:597 #: src/converse-rosterview.js:598
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: src/converse-rosterview.js:652 #: src/converse-rosterview.js:653
#, fuzzy #, fuzzy
msgid "Are you sure you want to remove this contact?" msgid "Are you sure you want to remove this contact?"
msgstr "确定移除联系人吗?" msgstr "确定移除联系人吗?"
#: src/converse-rosterview.js:663 #: src/converse-rosterview.js:664
msgid "Sorry, there was an error while trying to remove " msgid "Sorry, there was an error while trying to remove "
msgstr "" msgstr ""
#: src/converse-rosterview.js:682 #: src/converse-rosterview.js:683
#, fuzzy #, fuzzy
msgid "Are you sure you want to decline this contact request?" msgid "Are you sure you want to decline this contact request?"
msgstr "确定移除联系人吗?" msgstr "确定移除联系人吗?"
......
{ {
"name": "converse.js", "name": "converse.js",
"version": "1.0.1", "version": "1.0.2",
"description": "Browser based XMPP instant messaging client", "description": "Browser based XMPP instant messaging client",
"main": "main.js", "main": "main.js",
"directories": { "directories": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment