mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 22:10:22 +00:00
19 lines
414 B
JavaScript
19 lines
414 B
JavaScript
"use strict";
|
|
|
|
const $ = require("jquery");
|
|
const socket = require("../socket");
|
|
const {vueApp, findChannel} = require("../vue");
|
|
|
|
socket.on("users", function(data) {
|
|
if (vueApp.activeChannel && vueApp.activeChannel.channel.id === data.chan) {
|
|
return socket.emit("names", {
|
|
target: data.chan,
|
|
});
|
|
}
|
|
|
|
const channel = findChannel(data.chan);
|
|
|
|
if (channel) {
|
|
channel.channel.usersOutdated = true;
|
|
}
|
|
});
|