Rename the closured converse object to _converse
to indicate that it's private and to differentiate it from the outer "global" converse object.
This commit is contained in:
parent
a30cf931b8
commit
0424df9edc
@ -756,6 +756,12 @@
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("when sent by the current user", function () {
|
||||||
|
it("will always cause the chat area to be scrolled down", mock.initConverse(function (_converse) {
|
||||||
|
// TODO
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
it("is ignored if it's a malformed headline message", mock.initConverse(function (_converse) {
|
it("is ignored if it's a malformed headline message", mock.initConverse(function (_converse) {
|
||||||
test_utils.createContacts(_converse, 'current');
|
test_utils.createContacts(_converse, 'current');
|
||||||
test_utils.openControlBox();
|
test_utils.openControlBox();
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
define([
|
define([
|
||||||
"converse_api",
|
"converse_api",
|
||||||
"mock",
|
"mock",
|
||||||
|
"converse_api",
|
||||||
"test_utils",
|
"test_utils",
|
||||||
"utils",
|
"utils",
|
||||||
"transcripts"
|
"transcripts"
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
$msg = converse.env.$msg,
|
$msg = converse.env.$msg,
|
||||||
_ = converse.env._,
|
_ = converse.env._,
|
||||||
moment = converse.env.moment;
|
moment = converse.env.moment;
|
||||||
|
|
||||||
var KEY = {
|
var KEY = {
|
||||||
ENTER: 13,
|
ENTER: 13,
|
||||||
FORWARD_SLASH: 47
|
FORWARD_SLASH: 47
|
||||||
|
@ -44,7 +44,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var USERS_PANEL_ID = 'users';
|
var USERS_PANEL_ID = 'users';
|
||||||
|
|
||||||
// Strophe methods for building stanzas
|
// Strophe methods for building stanzas
|
||||||
var Strophe = converse.env.Strophe,
|
var Strophe = converse.env.Strophe,
|
||||||
utils = converse.env.utils;
|
utils = converse.env.utils;
|
||||||
|
@ -394,7 +394,6 @@
|
|||||||
_converse._tearDown();
|
_converse._tearDown();
|
||||||
_converse.chatboxviews.closeAllChatBoxes();
|
_converse.chatboxviews.closeAllChatBoxes();
|
||||||
_converse.emit('disconnected');
|
_converse.emit('disconnected');
|
||||||
return 'disconnected';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.onDisconnected = function () {
|
this.onDisconnected = function () {
|
||||||
|
@ -311,7 +311,6 @@
|
|||||||
* loaded by converse.js's plugin machinery.
|
* loaded by converse.js's plugin machinery.
|
||||||
*/
|
*/
|
||||||
var _converse = this._converse;
|
var _converse = this._converse;
|
||||||
|
|
||||||
// Add new HTML template
|
// Add new HTML template
|
||||||
_converse.templates.dragresize = tpl_dragresize;
|
_converse.templates.dragresize = tpl_dragresize;
|
||||||
|
|
||||||
|
@ -22,13 +22,13 @@
|
|||||||
*/
|
*/
|
||||||
var from_jid = message.getAttribute('from');
|
var from_jid = message.getAttribute('from');
|
||||||
if (utils.isHeadlineMessage(message)) {
|
if (utils.isHeadlineMessage(message)) {
|
||||||
converse.chatboxes.create({
|
_converse.chatboxes.create({
|
||||||
'id': from_jid,
|
'id': from_jid,
|
||||||
'jid': from_jid,
|
'jid': from_jid,
|
||||||
'fullname': from_jid,
|
'fullname': from_jid,
|
||||||
'type': 'headline'
|
'type': 'headline'
|
||||||
}).createMessage(message, undefined, message);
|
}).createMessage(message, undefined, message);
|
||||||
converse.emit('message', message);
|
_converse.emit('message', message);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
moment = converse.env.moment;
|
moment = converse.env.moment;
|
||||||
|
|
||||||
converse.plugins.add('converse-minimize', {
|
converse.plugins.add('converse-minimize', {
|
||||||
|
|
||||||
overrides: {
|
overrides: {
|
||||||
// Overrides mentioned here will be picked up by converse.js's
|
// Overrides mentioned here will be picked up by converse.js's
|
||||||
// plugin architecture they will replace existing methods on the
|
// plugin architecture they will replace existing methods on the
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
"converse-chatview"
|
"converse-chatview"
|
||||||
], factory);
|
], factory);
|
||||||
}(this, function (
|
}(this, function (
|
||||||
_converse,
|
|
||||||
converse,
|
converse,
|
||||||
tpl_chatarea,
|
tpl_chatarea,
|
||||||
tpl_chatroom,
|
tpl_chatroom,
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
* loaded by converse.js's plugin machinery.
|
* loaded by converse.js's plugin machinery.
|
||||||
*/
|
*/
|
||||||
var _converse = this._converse;
|
var _converse = this._converse;
|
||||||
|
|
||||||
// For translations
|
// For translations
|
||||||
var __ = _converse.__;
|
var __ = _converse.__;
|
||||||
var ___ = _converse.___;
|
var ___ = _converse.___;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
var HAS_CSPRNG = ((!_.isUndefined(crypto)) &&
|
var HAS_CSPRNG = ((!_.isUndefined(crypto)) &&
|
||||||
((_.isFunction(crypto.randomBytes)) || (_.isFunction(crypto.getRandomValues))
|
((_.isFunction(crypto.randomBytes)) || (_.isFunction(crypto.getRandomValues))
|
||||||
));
|
));
|
||||||
|
|
||||||
var HAS_CRYPTO = HAS_CSPRNG && (
|
var HAS_CRYPTO = HAS_CSPRNG && (
|
||||||
(!_.isUndefined(CryptoJS)) &&
|
(!_.isUndefined(CryptoJS)) &&
|
||||||
(!_.isUndefined(otr.OTR)) &&
|
(!_.isUndefined(otr.OTR)) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user