From c8a3a5a5694aef9b30fc4741448586fecd69f649 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 17 Sep 2023 22:56:00 +0300 Subject: [PATCH] prevent malicious use by excluding user subreddits --- files/helpers/offsitementions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/files/helpers/offsitementions.py b/files/helpers/offsitementions.py index f3f696139..50e798d3f 100644 --- a/files/helpers/offsitementions.py +++ b/files/helpers/offsitementions.py @@ -43,6 +43,7 @@ def get_mentions(cache, queries, reddit_notifs_users=False): continue if thing.get('subreddit_subscribers') and thing['subreddit_subscribers'] < 2: continue + if thing['subreddit_type'] == 'user': continue if thing['subreddit'] in {'IAmA', 'PokemonGoRaids', 'SubSimulatorGPT2', 'SubSimGPT2Interactive'}: continue if 'bot' in thing['author'].lower(): continue if 'AutoModerator' == thing['author']: continue