mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 05:43:04 +00:00
fix(moderation): enforce mute threshold for anonymous users
This commit is contained in:
1 parent
c4618c307b
commit
c1779fba78
1 file changed
+4
-2
@@ -338,9 +338,11 @@ class Application {
|
||||
if (
|
||||
normalized &&
|
||||
moderationService &&
|
||||
typeof moderationService.isAuthorMutedByTrusted === "function"
|
||||
typeof moderationService.getTrustedMutersForAuthor === "function"
|
||||
) {
|
||||
if (moderationService.isAuthorMutedByTrusted(normalized)) {
|
||||
const muters = moderationService.getTrustedMutersForAuthor(normalized);
|
||||
const threshold = getTrustedMuteHideThreshold();
|
||||
if (Array.isArray(muters) && muters.length >= threshold) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user