mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
exclude_banned_modqueue: apply to unmoderated as well
This commit is contained in:
@@ -568,6 +568,9 @@ class FrontController(RedditController, OAuth2ResourceController):
|
||||
return True # spam, unless banned by a moderator
|
||||
return False
|
||||
elif location == "unmoderated":
|
||||
# banned user, don't show if subreddit pref excludes
|
||||
if x.author._spam and x.subreddit.exclude_banned_modqueue:
|
||||
return False
|
||||
return not getattr(x, 'verdict', None)
|
||||
else:
|
||||
raise ValueError
|
||||
|
||||
@@ -840,7 +840,8 @@ def new_link(link):
|
||||
with CachedQueryMutator() as m:
|
||||
if link._spam:
|
||||
m.insert(get_spam_links(sr), [link])
|
||||
m.insert(get_unmoderated_links(sr), [link])
|
||||
if not (sr.exclude_banned_modqueue and author._spam):
|
||||
m.insert(get_unmoderated_links(sr), [link])
|
||||
|
||||
add_queries(results, insert_items = link)
|
||||
amqp.add_item('new_link', link._fullname)
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
%endif
|
||||
>
|
||||
<label for="exclude_banned_modqueue">
|
||||
${_("exclude posts by site-wide banned users from modqueue")}
|
||||
${_("exclude posts by site-wide banned users from modqueue/unmoderated")}
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Reference in New Issue
Block a user