Merge pull request #1348 from thelounge/astorije/fix-action-previews

Fix previews in actions ("/me") after page reload
This commit is contained in:
Pavel Djundik 2017-07-18 15:44:31 +03:00 committed by GitHub
commit ff757d4386

View file

@ -73,16 +73,14 @@ function buildChatMessage(data) {
const msg = $(templates[template](data.msg));
const text = msg.find(".text");
if (data.msg.previews.length) {
data.msg.previews.forEach((preview) => {
renderPreview(preview, msg);
});
}
if (template === "msg_action") {
text.html(templates.actions[type](data.msg));
}
data.msg.previews.forEach((preview) => {
renderPreview(preview, msg);
});
if ((type === "message" || type === "action") && chan.hasClass("channel")) {
const nicks = chan.find(".users").data("nicks");
if (nicks) {