Commit 7437cf2b authored by JC Brand's avatar JC Brand

Bugfix. Closured converse is not defined in utils.

parent 1261a252
...@@ -1297,7 +1297,12 @@ ...@@ -1297,7 +1297,12 @@
'message': '', 'message': '',
'extra_classes': extra_classes '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(); this.scrollDown();
}, },
...@@ -6148,6 +6153,7 @@ ...@@ -6148,6 +6153,7 @@
} }
} }
converse.connection.sendIQ(stanza, function (iq) { converse.connection.sendIQ(stanza, function (iq) {
debugger;
var rsm = new Strophe.RSM({xml: iq.getElementsByTagName('set')[0]}); var rsm = new Strophe.RSM({xml: iq.getElementsByTagName('set')[0]});
return _.bind(callback, this, arguments)(rsm); return _.bind(callback, this, arguments)(rsm);
}, errback); }, errback);
......
...@@ -50,8 +50,8 @@ ...@@ -50,8 +50,8 @@
return this; return this;
}; };
$.fn.addEmoticons = function () { $.fn.addEmoticons = function (allowed) {
if (converse.visible_toolbar_buttons.emoticons) { if (allowed) {
if (this.length > 0) { if (this.length > 0) {
this.each(function (i, obj) { this.each(function (i, obj) {
var text = $(obj).html(); var text = $(obj).html();
......
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