Commit ed010812 authored by JC Brand's avatar JC Brand

Use $.find instead of $.children

To allow for better template customization.
parent 38db959e
...@@ -219,13 +219,14 @@ ...@@ -219,13 +219,14 @@
* Parameters: * Parameters:
* (Object) attrs: An object containing the message attributes. * (Object) attrs: An object containing the message attributes.
*/ */
var that = this;
var insert = prepend ? this.$content.prepend : this.$content.append; var insert = prepend ? this.$content.prepend : this.$content.append;
_.compose( _.compose(
this.scrollDownMessageHeight.bind(this), this.scrollDownMessageHeight.bind(this),
function ($el) { function ($el) {
insert.call(this.$content, $el); insert.call(that.$content, $el);
return $el; return $el;
}.bind(this) }
)(this.renderMessage(attrs)); )(this.renderMessage(attrs));
}, },
...@@ -345,7 +346,7 @@ ...@@ -345,7 +346,7 @@
'username': username, 'username': username,
'extra_classes': extra_classes 'extra_classes': extra_classes
}) })
)).children('.chat-msg-content').first().text(text) )).find('.chat-msg-content').first().text(text)
.addHyperlinks() .addHyperlinks()
.addEmoticons(converse.visible_toolbar_buttons.emoticons).parent(); .addEmoticons(converse.visible_toolbar_buttons.emoticons).parent();
}, },
......
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