Bugfix. Closured converse is not defined in utils.

This commit is contained in:
JC Brand 2015-07-11 12:18:05 +02:00
parent 1261a2525d
commit 7437cf2b42
2 changed files with 9 additions and 3 deletions

View File

@ -1297,7 +1297,12 @@
'message': '',
'extra_classes': extra_classes
});
$content.append($(message).children('.chat-message-content').first().text(text).addHyperlinks().addEmoticons().parent());
$content.append(
$(message).children('.chat-message-content').first().text(text)
.addHyperlinks()
.addEmoticons(converse.visible_toolbar_buttons.emoticons)
.parent()
);
this.scrollDown();
},
@ -6148,6 +6153,7 @@
}
}
converse.connection.sendIQ(stanza, function (iq) {
debugger;
var rsm = new Strophe.RSM({xml: iq.getElementsByTagName('set')[0]});
return _.bind(callback, this, arguments)(rsm);
}, errback);

View File

@ -50,8 +50,8 @@
return this;
};
$.fn.addEmoticons = function () {
if (converse.visible_toolbar_buttons.emoticons) {
$.fn.addEmoticons = function (allowed) {
if (allowed) {
if (this.length > 0) {
this.each(function (i, obj) {
var text = $(obj).html();