merge staging and do a little lint compliance

This commit is contained in:
ansuz
2020-02-17 11:54:27 -05:00
parent f478ae725d
commit a4be6185de
4 changed files with 51 additions and 9 deletions

View File

@@ -112,6 +112,15 @@ module.exports.create = function (config, cb) {
},
channelOpen: function (Server, channelName, userId) {
Env.channel_cache[channelName] = Env.channel_cache[channelName] || {};
// XXX RESTRICT
// this event is emitted whenever a user joins a channel.
// if that channel is restricted then we should forcefully disconnect them.
// we won't know that it's restricted until we load its metadata.
// as long as metadata is in memory as long as anyone is sending messages to a channel
// then we won't broadcast messages to unauthorized users
Server.send(userId, [
0,
Env.id,