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

19 lines
403 B
JavaScript
Raw Normal View History

2017-05-18 20:08:54 +00:00
"use strict";
const socket = require("../socket");
const store = require("../store").default;
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
}
});