hardlounge/client/js/socket-events/msg_special.js
2019-08-04 14:03:04 +03:00

14 lines
323 B
JavaScript

"use strict";
const $ = require("jquery");
const socket = require("../socket");
const {vueApp, findChannel} = require("../vue");
socket.on("msg:special", function(data) {
findChannel(data.chan).channel.data = data.data;
vueApp.$nextTick(() => {
$(`#sidebar .chan[data-id="${data.chan}"]`).trigger("click");
});
});