Commit da74615b authored by JC Brand's avatar JC Brand

Regenerate dist files

parent 095e7add
...@@ -48542,7 +48542,7 @@ return Backbone.BrowserStorage; ...@@ -48542,7 +48542,7 @@ return Backbone.BrowserStorage;
Strophe.addNamespace('CSI', 'urn:xmpp:csi:0'); Strophe.addNamespace('CSI', 'urn:xmpp:csi:0');
Strophe.addNamespace('DELAY', 'urn:xmpp:delay'); Strophe.addNamespace('DELAY', 'urn:xmpp:delay');
Strophe.addNamespace('HINTS', 'urn:xmpp:hints'); Strophe.addNamespace('HINTS', 'urn:xmpp:hints');
Strophe.addNamespace('MAM', 'urn:xmpp:mam:0'); Strophe.addNamespace('MAM', 'urn:xmpp:mam:2');
Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick'); Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick');
Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub'); Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx'); Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx');
...@@ -58861,6 +58861,23 @@ Strophe.RSM.prototype = { ...@@ -58861,6 +58861,23 @@ Strophe.RSM.prototype = {
}, },
ChatRoomView: { ChatRoomView: {
initialize: function () {
var _converse = this.__super__._converse;
this.__super__.initialize.apply(this, arguments);
this.model.on('change:mam_enabled', function () {
// Fetch messages again if we find out that mam has
// been enabled (because the first attempt would then
// have failed.
this.fetchArchivedMessages({
'before': '', // Page backwards from the most recent message
'with': this.model.get('jid'),
'max': _converse.archived_messages_page_size
});
this.model.save({'mam_initialized': true});
}, this);
},
render: function () { render: function () {
var result = this.__super__.render.apply(this, arguments); var result = this.__super__.render.apply(this, arguments);
if (!this.disable_mam) { if (!this.disable_mam) {
...@@ -58886,7 +58903,6 @@ Strophe.RSM.prototype = { ...@@ -58886,7 +58903,6 @@ Strophe.RSM.prototype = {
* Then, upon receiving them, call onChatRoomMessage * Then, upon receiving them, call onChatRoomMessage
* so that they are displayed inside it. * so that they are displayed inside it.
*/ */
var that = this;
var _converse = this.__super__._converse; var _converse = this.__super__._converse;
if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) { if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) {
_converse.log( _converse.log(
...@@ -58898,6 +58914,8 @@ Strophe.RSM.prototype = { ...@@ -58898,6 +58914,8 @@ Strophe.RSM.prototype = {
return; return;
} }
this.addSpinner(); this.addSpinner();
var that = this;
_converse.api.archive.query(_.extend(options, {'groupchat': true}), _converse.api.archive.query(_.extend(options, {'groupchat': true}),
function (messages) { function (messages) {
that.clearSpinner(); that.clearSpinner();
...@@ -58952,18 +58970,13 @@ Strophe.RSM.prototype = { ...@@ -58952,18 +58970,13 @@ Strophe.RSM.prototype = {
callback = options; callback = options;
errback = callback; errback = callback;
} }
/*
if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) {
_converse.log('This server does not support XEP-0313, Message Archive Management');
errback(null);
return;
}
*/
var queryid = _converse.connection.getUniqueId(); var queryid = _converse.connection.getUniqueId();
var attrs = {'type':'set'}; var attrs = {'type':'set'};
if (!_.isUndefined(options) && options.groupchat) { if (!_.isUndefined(options) && options.groupchat) {
if (!options['with']) { if (!options['with']) {
throw new Error('You need to specify a "with" value containing the chat room JID, when querying groupchat messages.'); throw new Error(
'You need to specify a "with" value containing '+
'the chat room JID, when querying groupchat messages.');
} }
attrs.to = options['with']; attrs.to = options['with'];
} }
...@@ -58994,23 +59007,31 @@ Strophe.RSM.prototype = { ...@@ -58994,23 +59007,31 @@ Strophe.RSM.prototype = {
} }
} }
if (_.isFunction(callback)) { var message_handler = _converse.connection.addHandler(function (message) {
_converse.connection.addHandler(function (message) { var result = message.querySelector('result');
var $msg = $(message), rsm, if (!_.isNull(result) && result.getAttribute('queryid') === queryid) {
$fin = $msg.find('fin[xmlns="'+Strophe.NS.MAM+'"]'); messages.push(message);
if ($fin.length && $fin.attr('queryid') === queryid) { }
rsm = new Strophe.RSM({xml: $fin.find('set')[0]}); return true;
_.extend(rsm, _.pick(options, ['max'])); }, Strophe.NS.MAM);
_.extend(rsm, _.pick(options, MAM_ATTRIBUTES));
_converse.connection.sendIQ(
stanza,
function (iq) {
_converse.connection.deleteHandler(message_handler);
if (_.isFunction(callback)) {
var set = iq.querySelector('set');
var rsm = new Strophe.RSM({xml: set});
_.extend(rsm, _.pick(options, _.concat(MAM_ATTRIBUTES, ['max'])));
callback(messages, rsm); callback(messages, rsm);
return false; // We've received all messages, decommission this handler
} else if (queryid === $msg.find('result').attr('queryid')) {
messages.push(message);
} }
return true; },
}, Strophe.NS.MAM); function () {
} _converse.connection.deleteHandler(message_handler);
_converse.connection.sendIQ(stanza, null, errback, _converse.message_archiving_timeout); if (_.isFunction(errback)) { errback.apply(this, arguments); }
},
_converse.message_archiving_timeout
);
}; };
_.extend(_converse.api, { _.extend(_converse.api, {
...@@ -6666,7 +6666,7 @@ return __p ...@@ -6666,7 +6666,7 @@ return __p
Strophe.addNamespace('CSI', 'urn:xmpp:csi:0'); Strophe.addNamespace('CSI', 'urn:xmpp:csi:0');
Strophe.addNamespace('DELAY', 'urn:xmpp:delay'); Strophe.addNamespace('DELAY', 'urn:xmpp:delay');
Strophe.addNamespace('HINTS', 'urn:xmpp:hints'); Strophe.addNamespace('HINTS', 'urn:xmpp:hints');
Strophe.addNamespace('MAM', 'urn:xmpp:mam:0'); Strophe.addNamespace('MAM', 'urn:xmpp:mam:2');
Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick'); Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick');
Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub'); Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx'); Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx');
...@@ -16583,6 +16583,23 @@ return __p ...@@ -16583,6 +16583,23 @@ return __p
}, },
ChatRoomView: { ChatRoomView: {
initialize: function () {
var _converse = this.__super__._converse;
this.__super__.initialize.apply(this, arguments);
this.model.on('change:mam_enabled', function () {
// Fetch messages again if we find out that mam has
// been enabled (because the first attempt would then
// have failed.
this.fetchArchivedMessages({
'before': '', // Page backwards from the most recent message
'with': this.model.get('jid'),
'max': _converse.archived_messages_page_size
});
this.model.save({'mam_initialized': true});
}, this);
},
render: function () { render: function () {
var result = this.__super__.render.apply(this, arguments); var result = this.__super__.render.apply(this, arguments);
if (!this.disable_mam) { if (!this.disable_mam) {
...@@ -16608,7 +16625,6 @@ return __p ...@@ -16608,7 +16625,6 @@ return __p
* Then, upon receiving them, call onChatRoomMessage * Then, upon receiving them, call onChatRoomMessage
* so that they are displayed inside it. * so that they are displayed inside it.
*/ */
var that = this;
var _converse = this.__super__._converse; var _converse = this.__super__._converse;
if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) { if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) {
_converse.log( _converse.log(
...@@ -16620,6 +16636,8 @@ return __p ...@@ -16620,6 +16636,8 @@ return __p
return; return;
} }
this.addSpinner(); this.addSpinner();
var that = this;
_converse.api.archive.query(_.extend(options, {'groupchat': true}), _converse.api.archive.query(_.extend(options, {'groupchat': true}),
function (messages) { function (messages) {
that.clearSpinner(); that.clearSpinner();
...@@ -16674,18 +16692,13 @@ return __p ...@@ -16674,18 +16692,13 @@ return __p
callback = options; callback = options;
errback = callback; errback = callback;
} }
/*
if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) {
_converse.log('This server does not support XEP-0313, Message Archive Management');
errback(null);
return;
}
*/
var queryid = _converse.connection.getUniqueId(); var queryid = _converse.connection.getUniqueId();
var attrs = {'type':'set'}; var attrs = {'type':'set'};
if (!_.isUndefined(options) && options.groupchat) { if (!_.isUndefined(options) && options.groupchat) {
if (!options['with']) { if (!options['with']) {
throw new Error('You need to specify a "with" value containing the chat room JID, when querying groupchat messages.'); throw new Error(
'You need to specify a "with" value containing '+
'the chat room JID, when querying groupchat messages.');
} }
attrs.to = options['with']; attrs.to = options['with'];
} }
...@@ -16716,23 +16729,31 @@ return __p ...@@ -16716,23 +16729,31 @@ return __p
} }
} }
if (_.isFunction(callback)) { var message_handler = _converse.connection.addHandler(function (message) {
_converse.connection.addHandler(function (message) { var result = message.querySelector('result');
var $msg = $(message), rsm, if (!_.isNull(result) && result.getAttribute('queryid') === queryid) {
$fin = $msg.find('fin[xmlns="'+Strophe.NS.MAM+'"]'); messages.push(message);
if ($fin.length && $fin.attr('queryid') === queryid) { }
rsm = new Strophe.RSM({xml: $fin.find('set')[0]}); return true;
_.extend(rsm, _.pick(options, ['max'])); }, Strophe.NS.MAM);
_.extend(rsm, _.pick(options, MAM_ATTRIBUTES));
_converse.connection.sendIQ(
stanza,
function (iq) {
_converse.connection.deleteHandler(message_handler);
if (_.isFunction(callback)) {
var set = iq.querySelector('set');
var rsm = new Strophe.RSM({xml: set});
_.extend(rsm, _.pick(options, _.concat(MAM_ATTRIBUTES, ['max'])));
callback(messages, rsm); callback(messages, rsm);
return false; // We've received all messages, decommission this handler
} else if (queryid === $msg.find('result').attr('queryid')) {
messages.push(message);
} }
return true; },
}, Strophe.NS.MAM); function () {
} _converse.connection.deleteHandler(message_handler);
_converse.connection.sendIQ(stanza, null, errback, _converse.message_archiving_timeout); if (_.isFunction(errback)) { errback.apply(this, arguments); }
},
_converse.message_archiving_timeout
);
}; };
_.extend(_converse.api, { _.extend(_converse.api, {
......
...@@ -48542,7 +48542,7 @@ return Backbone.BrowserStorage; ...@@ -48542,7 +48542,7 @@ return Backbone.BrowserStorage;
Strophe.addNamespace('CSI', 'urn:xmpp:csi:0'); Strophe.addNamespace('CSI', 'urn:xmpp:csi:0');
Strophe.addNamespace('DELAY', 'urn:xmpp:delay'); Strophe.addNamespace('DELAY', 'urn:xmpp:delay');
Strophe.addNamespace('HINTS', 'urn:xmpp:hints'); Strophe.addNamespace('HINTS', 'urn:xmpp:hints');
Strophe.addNamespace('MAM', 'urn:xmpp:mam:0'); Strophe.addNamespace('MAM', 'urn:xmpp:mam:2');
Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick'); Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick');
Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub'); Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx'); Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx');
...@@ -58991,6 +58991,23 @@ Strophe.RSM.prototype = { ...@@ -58991,6 +58991,23 @@ Strophe.RSM.prototype = {
}, },
ChatRoomView: { ChatRoomView: {
initialize: function () {
var _converse = this.__super__._converse;
this.__super__.initialize.apply(this, arguments);
this.model.on('change:mam_enabled', function () {
// Fetch messages again if we find out that mam has
// been enabled (because the first attempt would then
// have failed.
this.fetchArchivedMessages({
'before': '', // Page backwards from the most recent message
'with': this.model.get('jid'),
'max': _converse.archived_messages_page_size
});
this.model.save({'mam_initialized': true});
}, this);
},
render: function () { render: function () {
var result = this.__super__.render.apply(this, arguments); var result = this.__super__.render.apply(this, arguments);
if (!this.disable_mam) { if (!this.disable_mam) {
...@@ -59016,7 +59033,6 @@ Strophe.RSM.prototype = { ...@@ -59016,7 +59033,6 @@ Strophe.RSM.prototype = {
* Then, upon receiving them, call onChatRoomMessage * Then, upon receiving them, call onChatRoomMessage
* so that they are displayed inside it. * so that they are displayed inside it.
*/ */
var that = this;
var _converse = this.__super__._converse; var _converse = this.__super__._converse;
if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) { if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) {
_converse.log( _converse.log(
...@@ -59028,6 +59044,8 @@ Strophe.RSM.prototype = { ...@@ -59028,6 +59044,8 @@ Strophe.RSM.prototype = {
return; return;
} }
this.addSpinner(); this.addSpinner();
var that = this;
_converse.api.archive.query(_.extend(options, {'groupchat': true}), _converse.api.archive.query(_.extend(options, {'groupchat': true}),
function (messages) { function (messages) {
that.clearSpinner(); that.clearSpinner();
...@@ -59082,18 +59100,13 @@ Strophe.RSM.prototype = { ...@@ -59082,18 +59100,13 @@ Strophe.RSM.prototype = {
callback = options; callback = options;
errback = callback; errback = callback;
} }
/*
if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) {
_converse.log('This server does not support XEP-0313, Message Archive Management');
errback(null);
return;
}
*/
var queryid = _converse.connection.getUniqueId(); var queryid = _converse.connection.getUniqueId();
var attrs = {'type':'set'}; var attrs = {'type':'set'};
if (!_.isUndefined(options) && options.groupchat) { if (!_.isUndefined(options) && options.groupchat) {
if (!options['with']) { if (!options['with']) {
throw new Error('You need to specify a "with" value containing the chat room JID, when querying groupchat messages.'); throw new Error(
'You need to specify a "with" value containing '+
'the chat room JID, when querying groupchat messages.');
} }
attrs.to = options['with']; attrs.to = options['with'];
} }
...@@ -59124,23 +59137,31 @@ Strophe.RSM.prototype = { ...@@ -59124,23 +59137,31 @@ Strophe.RSM.prototype = {
} }
} }
if (_.isFunction(callback)) { var message_handler = _converse.connection.addHandler(function (message) {
_converse.connection.addHandler(function (message) { var result = message.querySelector('result');
var $msg = $(message), rsm, if (!_.isNull(result) && result.getAttribute('queryid') === queryid) {
$fin = $msg.find('fin[xmlns="'+Strophe.NS.MAM+'"]'); messages.push(message);
if ($fin.length && $fin.attr('queryid') === queryid) { }
rsm = new Strophe.RSM({xml: $fin.find('set')[0]}); return true;
_.extend(rsm, _.pick(options, ['max'])); }, Strophe.NS.MAM);
_.extend(rsm, _.pick(options, MAM_ATTRIBUTES));
_converse.connection.sendIQ(
stanza,
function (iq) {
_converse.connection.deleteHandler(message_handler);
if (_.isFunction(callback)) {
var set = iq.querySelector('set');
var rsm = new Strophe.RSM({xml: set});
_.extend(rsm, _.pick(options, _.concat(MAM_ATTRIBUTES, ['max'])));
callback(messages, rsm); callback(messages, rsm);
return false; // We've received all messages, decommission this handler
} else if (queryid === $msg.find('result').attr('queryid')) {
messages.push(message);
} }
return true; },
}, Strophe.NS.MAM); function () {
} _converse.connection.deleteHandler(message_handler);
_converse.connection.sendIQ(stanza, null, errback, _converse.message_archiving_timeout); if (_.isFunction(errback)) { errback.apply(this, arguments); }
},
_converse.message_archiving_timeout
);
}; };
_.extend(_converse.api, { _.extend(_converse.api, {
...@@ -48542,7 +48542,7 @@ return Backbone.BrowserStorage; ...@@ -48542,7 +48542,7 @@ return Backbone.BrowserStorage;
Strophe.addNamespace('CSI', 'urn:xmpp:csi:0'); Strophe.addNamespace('CSI', 'urn:xmpp:csi:0');
Strophe.addNamespace('DELAY', 'urn:xmpp:delay'); Strophe.addNamespace('DELAY', 'urn:xmpp:delay');
Strophe.addNamespace('HINTS', 'urn:xmpp:hints'); Strophe.addNamespace('HINTS', 'urn:xmpp:hints');
Strophe.addNamespace('MAM', 'urn:xmpp:mam:0'); Strophe.addNamespace('MAM', 'urn:xmpp:mam:2');
Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick'); Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick');
Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub'); Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx'); Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx');
...@@ -58991,6 +58991,23 @@ Strophe.RSM.prototype = { ...@@ -58991,6 +58991,23 @@ Strophe.RSM.prototype = {
}, },
ChatRoomView: { ChatRoomView: {
initialize: function () {
var _converse = this.__super__._converse;
this.__super__.initialize.apply(this, arguments);
this.model.on('change:mam_enabled', function () {
// Fetch messages again if we find out that mam has
// been enabled (because the first attempt would then
// have failed.
this.fetchArchivedMessages({
'before': '', // Page backwards from the most recent message
'with': this.model.get('jid'),
'max': _converse.archived_messages_page_size
});
this.model.save({'mam_initialized': true});
}, this);
},
render: function () { render: function () {
var result = this.__super__.render.apply(this, arguments); var result = this.__super__.render.apply(this, arguments);
if (!this.disable_mam) { if (!this.disable_mam) {
...@@ -59016,7 +59033,6 @@ Strophe.RSM.prototype = { ...@@ -59016,7 +59033,6 @@ Strophe.RSM.prototype = {
* Then, upon receiving them, call onChatRoomMessage * Then, upon receiving them, call onChatRoomMessage
* so that they are displayed inside it. * so that they are displayed inside it.
*/ */
var that = this;
var _converse = this.__super__._converse; var _converse = this.__super__._converse;
if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) { if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) {
_converse.log( _converse.log(
...@@ -59028,6 +59044,8 @@ Strophe.RSM.prototype = { ...@@ -59028,6 +59044,8 @@ Strophe.RSM.prototype = {
return; return;
} }
this.addSpinner(); this.addSpinner();
var that = this;
_converse.api.archive.query(_.extend(options, {'groupchat': true}), _converse.api.archive.query(_.extend(options, {'groupchat': true}),
function (messages) { function (messages) {
that.clearSpinner(); that.clearSpinner();
...@@ -59082,18 +59100,13 @@ Strophe.RSM.prototype = { ...@@ -59082,18 +59100,13 @@ Strophe.RSM.prototype = {
callback = options; callback = options;
errback = callback; errback = callback;
} }
/*
if (!_converse.features.findWhere({'var': Strophe.NS.MAM})) {
_converse.log('This server does not support XEP-0313, Message Archive Management');
errback(null);
return;
}
*/
var queryid = _converse.connection.getUniqueId(); var queryid = _converse.connection.getUniqueId();
var attrs = {'type':'set'}; var attrs = {'type':'set'};
if (!_.isUndefined(options) && options.groupchat) { if (!_.isUndefined(options) && options.groupchat) {
if (!options['with']) { if (!options['with']) {
throw new Error('You need to specify a "with" value containing the chat room JID, when querying groupchat messages.'); throw new Error(
'You need to specify a "with" value containing '+
'the chat room JID, when querying groupchat messages.');
} }
attrs.to = options['with']; attrs.to = options['with'];
} }
...@@ -59124,23 +59137,31 @@ Strophe.RSM.prototype = { ...@@ -59124,23 +59137,31 @@ Strophe.RSM.prototype = {
} }
} }
if (_.isFunction(callback)) { var message_handler = _converse.connection.addHandler(function (message) {
_converse.connection.addHandler(function (message) { var result = message.querySelector('result');
var $msg = $(message), rsm, if (!_.isNull(result) && result.getAttribute('queryid') === queryid) {
$fin = $msg.find('fin[xmlns="'+Strophe.NS.MAM+'"]'); messages.push(message);
if ($fin.length && $fin.attr('queryid') === queryid) { }
rsm = new Strophe.RSM({xml: $fin.find('set')[0]}); return true;
_.extend(rsm, _.pick(options, ['max'])); }, Strophe.NS.MAM);
_.extend(rsm, _.pick(options, MAM_ATTRIBUTES));
_converse.connection.sendIQ(
stanza,
function (iq) {
_converse.connection.deleteHandler(message_handler);
if (_.isFunction(callback)) {
var set = iq.querySelector('set');
var rsm = new Strophe.RSM({xml: set});
_.extend(rsm, _.pick(options, _.concat(MAM_ATTRIBUTES, ['max'])));
callback(messages, rsm); callback(messages, rsm);
return false; // We've received all messages, decommission this handler
} else if (queryid === $msg.find('result').attr('queryid')) {
messages.push(message);
} }
return true; },
}, Strophe.NS.MAM); function () {
} _converse.connection.deleteHandler(message_handler);
_converse.connection.sendIQ(stanza, null, errback, _converse.message_archiving_timeout); if (_.isFunction(errback)) { errback.apply(this, arguments); }
},
_converse.message_archiving_timeout
);
}; };
_.extend(_converse.api, { _.extend(_converse.api, {
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