Merge branch 'testing' into main

pull/1/head
ansuz 3 years ago
commit e05818caa7

@ -258,6 +258,11 @@ Channel.writePrivateMessage = function (Env, args, _cb, Server, netfluxId) {
return void cb('METADATA_ERR');
}
// treat the broadcast channel as write-protected
if (channelId.length === HK.ADMIN_CHANNEL_LENGTH) {
metadata.restricted = true;
}
if (!metadata || !metadata.restricted) {
return;
}
@ -265,10 +270,6 @@ Channel.writePrivateMessage = function (Env, args, _cb, Server, netfluxId) {
var session = HK.getNetfluxSession(Env, netfluxId);
var allowed = HK.listAllowedUsers(metadata);
// Special broadcast channel
if (channelId.length === HK.ADMIN_CHANNEL_LENGTH) {
allowed = Env.admins;
}
if (HK.isUserSessionAllowed(allowed, session)) { return; }

Loading…
Cancel
Save