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";
2019-11-16 17:24:03 +00:00
import socket from "../socket";
import store from "../store";
2017-05-18 20:08:54 +00:00
socket.on("users", function(data) {
if (store.state.activeChannel && store.state.activeChannel.channel.id === data.chan) {
return socket.emit("names", {
target: data.chan,
2017-05-18 20:08:54 +00:00
});
}
const channel = store.getters.findChannel(data.chan);
if (channel) {
channel.channel.usersOutdated = true;
2017-05-18 20:08:54 +00:00
}
});