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

17 lines
373 B
TypeScript
Raw Permalink Normal View History

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
}
});