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:
JC Brand 2016-12-20 09:30:20 +00:00
parent a30cf931b8
commit 0424df9edc
11 changed files with 11 additions and 8 deletions

View File

@ -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) {
test_utils.createContacts(_converse, 'current');
test_utils.openControlBox();

View File

@ -3,6 +3,7 @@
define([
"converse_api",
"mock",
"converse_api",
"test_utils",
"utils",
"transcripts"

View File

@ -32,6 +32,7 @@
$msg = converse.env.$msg,
_ = converse.env._,
moment = converse.env.moment;
var KEY = {
ENTER: 13,
FORWARD_SLASH: 47

View File

@ -44,7 +44,6 @@
"use strict";
var USERS_PANEL_ID = 'users';
// Strophe methods for building stanzas
var Strophe = converse.env.Strophe,
utils = converse.env.utils;

View File

@ -394,7 +394,6 @@
_converse._tearDown();
_converse.chatboxviews.closeAllChatBoxes();
_converse.emit('disconnected');
return 'disconnected';
};
this.onDisconnected = function () {

View File

@ -311,7 +311,6 @@
* loaded by converse.js's plugin machinery.
*/
var _converse = this._converse;
// Add new HTML template
_converse.templates.dragresize = tpl_dragresize;

View File

@ -22,13 +22,13 @@
*/
var from_jid = message.getAttribute('from');
if (utils.isHeadlineMessage(message)) {
converse.chatboxes.create({
_converse.chatboxes.create({
'id': from_jid,
'jid': from_jid,
'fullname': from_jid,
'type': 'headline'
}).createMessage(message, undefined, message);
converse.emit('message', message);
_converse.emit('message', message);
}
return true;
};

View File

@ -31,7 +31,6 @@
moment = converse.env.moment;
converse.plugins.add('converse-minimize', {
overrides: {
// Overrides mentioned here will be picked up by converse.js's
// plugin architecture they will replace existing methods on the

View File

@ -31,7 +31,6 @@
"converse-chatview"
], factory);
}(this, function (
_converse,
converse,
tpl_chatarea,
tpl_chatroom,

View File

@ -22,7 +22,6 @@
* loaded by converse.js's plugin machinery.
*/
var _converse = this._converse;
// For translations
var __ = _converse.__;
var ___ = _converse.___;

View File

@ -28,6 +28,7 @@
var HAS_CSPRNG = ((!_.isUndefined(crypto)) &&
((_.isFunction(crypto.randomBytes)) || (_.isFunction(crypto.getRandomValues))
));
var HAS_CRYPTO = HAS_CSPRNG && (
(!_.isUndefined(CryptoJS)) &&
(!_.isUndefined(otr.OTR)) &&