mirror of
https://github.com/thelounge/thelounge
synced 2024-12-30 06:13:07 +00:00
1dc92d8934
¯\_(ツ)_/¯
17 lines
333 B
JavaScript
17 lines
333 B
JavaScript
"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,
|
|
});
|
|
} else {
|
|
chan.data("needsNamesRefresh", true);
|
|
}
|
|
});
|