Add config to exclude users
This commit is contained in:
parent
0dceec826e
commit
414ad0ea4e
@ -1 +1,2 @@
|
|||||||
REGISTRATION_SHARED_SECRET='look in your synapses homeserver.yaml'
|
REGISTRATION_SHARED_SECRET='look in your synapses homeserver.yaml'
|
||||||
|
EXCLUDED_USERS='rocket.cat' # Comma-separated list
|
||||||
|
|||||||
@ -44,10 +44,7 @@ function loadRcExport(entity: Entities): Promise<void> {
|
|||||||
// Check for exclusion
|
// Check for exclusion
|
||||||
if (
|
if (
|
||||||
rcUser.roles.some((e) => ['app', 'bot'].includes(e)) ||
|
rcUser.roles.some((e) => ['app', 'bot'].includes(e)) ||
|
||||||
[
|
(process.env.EXCLUDED_USERS || '').split(',').includes(rcUser._id)
|
||||||
'rocket.cat',
|
|
||||||
'5kdLWNTys3u2MhB2H', // verdiadmin
|
|
||||||
].includes(rcUser._id)
|
|
||||||
) {
|
) {
|
||||||
log.debug('User excluded. Skipping.')
|
log.debug('User excluded. Skipping.')
|
||||||
break
|
break
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user