semi-functional allow-list implementation in historyKeeper
This commit is contained in:
@@ -12,7 +12,7 @@ Data.getMetadata = function (Env, channel, cb/* , Server */) {
|
||||
if (!Core.isValidId(channel)) { return void cb('INVALID_CHAN'); }
|
||||
if (channel.length !== 32) { return cb("INVALID_CHAN_LENGTH"); }
|
||||
|
||||
// FIXME get metadata from the server cache if it is available
|
||||
// XXX get metadata from the server cache if it is available
|
||||
batchMetadata(channel, cb, function (done) {
|
||||
var ref = {};
|
||||
var lineHandler = Meta.createLineHandler(ref, Env.Log.error);
|
||||
@@ -108,6 +108,16 @@ Data.setMetadata = function (Env, safeKey, data, cb, Server) {
|
||||
return void next();
|
||||
}
|
||||
|
||||
|
||||
// chainpad-server@4.0.3 supports a removeFromChannel method
|
||||
// Server.removeFromChannel(channelName, userId);
|
||||
// this lets us kick users from restricted channels
|
||||
|
||||
// XXX RESTRICT
|
||||
// if the metadata changes and includes an allowed list
|
||||
// kick any current users from the channel
|
||||
// if they aren't on it.
|
||||
|
||||
cb(void 0, metadata);
|
||||
next();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user