thelounge/client/js/socket-events/msg_preview.js
2017-07-21 19:39:06 +03:00

11 lines
250 B
JavaScript

"use strict";
const $ = require("jquery");
const renderPreview = require("../renderPreview");
const socket = require("../socket");
socket.on("msg:preview", function(data) {
const msg = $("#msg-" + data.id);
renderPreview(data.preview, msg);
});