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

19 lines
385 B
JavaScript
Raw Normal View History

2017-05-18 20:08:54 +00:00
"use strict";
const socket = require("../socket");
const {vueApp, findChannel} = require("../vue");
2017-05-18 20:08:54 +00:00
socket.on("users", function(data) {
if (vueApp.activeChannel && vueApp.activeChannel.channel.id === data.chan) {
return socket.emit("names", {
target: data.chan,
2017-05-18 20:08:54 +00:00
});
}
const channel = findChannel(data.chan);
if (channel) {
channel.channel.usersOutdated = true;
2017-05-18 20:08:54 +00:00
}
});