merge communities-allow-list and lint compliance
This commit is contained in:
@@ -147,7 +147,6 @@ module.exports.create = function (config, cb) {
|
||||
error: err,
|
||||
});
|
||||
}
|
||||
|
||||
if (!metadata || (metadata && !metadata.restricted)) {
|
||||
// the channel doesn't have metadata, or it does and it's not restricted
|
||||
// either way, let them join.
|
||||
@@ -168,14 +167,12 @@ module.exports.create = function (config, cb) {
|
||||
// otherwise they're not allowed.
|
||||
// respond with a special error that includes the list of keys
|
||||
// which would be allowed...
|
||||
// FIXME bonus points if you hash the keys to limit data exposure
|
||||
// FIXME RESTRICT bonus points if you hash the keys to limit data exposure
|
||||
cb("ERESTRICTED", allowed);
|
||||
});
|
||||
},
|
||||
sessionClose: function (userId, reason) {
|
||||
HK.closeNetfluxSession(Env, userId);
|
||||
|
||||
// TODO RESTRICT drop user session data
|
||||
if (['BAD_MESSAGE', 'SOCKET_ERROR', 'SEND_MESSAGE_FAIL_2'].indexOf(reason) !== -1) {
|
||||
if (reason && reason.code === 'ECONNRESET') { return; }
|
||||
return void Log.error('SESSION_CLOSE_WITH_ERROR', {
|
||||
@@ -184,7 +181,7 @@ module.exports.create = function (config, cb) {
|
||||
});
|
||||
}
|
||||
|
||||
if (reason && reason === 'SOCKET_CLOSED') { return; }
|
||||
if (['SOCKET_CLOSED', 'SOCKET_ERROR'].indexOf(reason)) { return; }
|
||||
Log.verbose('SESSION_CLOSE_ROUTINE', {
|
||||
userId: userId,
|
||||
reason: reason,
|
||||
|
||||
Reference in New Issue
Block a user