hardlounge/client/js/socket-events/msg_special.js

14 lines
323 B
JavaScript
Raw Normal View History

2018-07-10 09:16:24 +00:00
"use strict";
2019-08-04 11:03:04 +00:00
const $ = require("jquery");
2018-07-10 09:16:24 +00:00
const socket = require("../socket");
2019-08-04 11:03:04 +00:00
const {vueApp, findChannel} = require("../vue");
2018-07-10 09:16:24 +00:00
socket.on("msg:special", function(data) {
2018-07-10 09:37:48 +00:00
findChannel(data.chan).channel.data = data.data;
2019-08-04 11:03:04 +00:00
vueApp.$nextTick(() => {
$(`#sidebar .chan[data-id="${data.chan}"]`).trigger("click");
});
2018-07-10 09:16:24 +00:00
});