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

18 lines
333 B
JavaScript
Raw Normal View History

2017-05-18 20:08:54 +00:00
"use strict";
const $ = require("jquery");
const socket = require("../socket");
const chat = $("#chat");
socket.on("users", function(data) {
const chan = chat.find("#chan-" + data.chan);
if (chan.hasClass("active")) {
socket.emit("names", {
target: data.chan,
2017-05-18 20:08:54 +00:00
});
} else {
chan.data("needsNamesRefresh", true);
}
});