Commit 02864fd1 authored by JC Brand's avatar JC Brand

Don't assume the parent is the top-level message element.

parent 151a4760
...@@ -337,18 +337,21 @@ ...@@ -337,18 +337,21 @@
"Output has been shortened."), "Output has been shortened."),
true, true); true, true);
} }
return $(template( var $msg = $(template(
_.extend(this.getExtraMessageTemplateAttributes(attrs), { _.extend(this.getExtraMessageTemplateAttributes(attrs), {
'msgid': attrs.msgid, 'msgid': attrs.msgid,
'sender': attrs.sender, 'sender': attrs.sender,
'time': msg_time.format('hh:mm'), 'time': msg_time.format('hh:mm'),
'isodate': msg_time.format(), 'isodate': msg_time.format(),
'username': username, 'username': username,
'extra_classes': extra_classes 'extra_classes': extra_classes
}) })
)).find('.chat-msg-content').first().text(text) ));
.addHyperlinks() $msg.find('.chat-msg-content').first()
.addEmoticons(converse.visible_toolbar_buttons.emoticons).parent(); .text(text)
.addHyperlinks()
.addEmoticons(converse.visible_toolbar_buttons.emoticons);
return $msg;
}, },
showHelpMessages: function (msgs, type, spinner) { showHelpMessages: function (msgs, type, spinner) {
......
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