Optional actor spam filter

main
Bob Mottram 2022-09-07 19:55:48 +01:00
parent c91ee85dc4
commit 8a146e045e
1 changed files with 6 additions and 0 deletions

View File

@ -1776,6 +1776,12 @@ def valid_sending_actor(session, base_dir: str,
if not actor_json.get('preferredUsername'):
print('REJECT: no preferredUsername within actor ' + str(actor_json))
return False
actor_spam_filter_filename = \
acct_dir(base_dir, nickname, domain) + '/.reject_spam_actors'
if not os.path.isfile(actor_spam_filter_filename):
return True
# does the actor have a bio ?
if not unit_test:
bio_str = ''