From bf87733ac10865ea07c749f4452c0f1e1b880969 Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 14 Dec 2020 15:59:56 -0600 Subject: [PATCH] feat: anon switch --- packages/user/src/models/user-reddichat.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/user/src/models/user-reddichat.js b/packages/user/src/models/user-reddichat.js index b94fd54..225ff3c 100644 --- a/packages/user/src/models/user-reddichat.js +++ b/packages/user/src/models/user-reddichat.js @@ -46,6 +46,12 @@ export default (User, latus) => class UserReddichat extends User { } async isBannedFrom(channel) { + if ( + latus.config['%reddichatNoAnonymous'] + && '/r/anonymous' === renderChannel(channel) + ) { + return true; + } return -1 !== (await this.bannedFrom).indexOf(renderChannel(channel)); }