Revert "Simplify"

This reverts commit 65f26f4046.
merge-requests/30/head
Bob Mottram 2022-03-24 14:49:44 +00:00
parent c7ed262691
commit f6da511dbf
1 changed files with 8 additions and 6 deletions

View File

@ -3350,7 +3350,7 @@ def _inbox_after_initial(server,
cw_lists: {}, lists_enabled: str, cw_lists: {}, lists_enabled: str,
content_license_url: str, content_license_url: str,
languages_understood: [], languages_understood: [],
mitm: bool) -> bool: mitm: bool, bold_reading: bool) -> bool:
""" Anything which needs to be done after initial checks have passed """ Anything which needs to be done after initial checks have passed
""" """
# if this is a clearnet instance then replace any onion/i2p # if this is a clearnet instance then replace any onion/i2p
@ -3377,10 +3377,6 @@ def _inbox_after_initial(server,
handle_name = handle.split('@')[0] handle_name = handle.split('@')[0]
bold_reading = False
if server.bold_reading.get(handle_name):
bold_reading = True
if _receive_like(recent_posts_cache, if _receive_like(recent_posts_cache,
session, handle, is_group, session, handle, is_group,
base_dir, http_prefix, base_dir, http_prefix,
@ -4808,6 +4804,11 @@ def run_inbox_queue(server,
mitm = False mitm = False
if queue_json.get('mitm'): if queue_json.get('mitm'):
mitm = True mitm = True
bold_reading = False
bold_reading_filename = \
base_dir + '/accounts/' + handle + '/.boldReading'
if os.path.isfile(bold_reading_filename):
bold_reading = True
_inbox_after_initial(server, _inbox_after_initial(server,
recent_posts_cache, recent_posts_cache,
max_recent_posts, max_recent_posts,
@ -4839,7 +4840,8 @@ def run_inbox_queue(server,
default_reply_interval_hrs, default_reply_interval_hrs,
cw_lists, lists_enabled, cw_lists, lists_enabled,
content_license_url, content_license_url,
languages_understood, mitm) languages_understood, mitm,
bold_reading)
if debug: if debug:
pprint(queue_json['post']) pprint(queue_json['post'])
print('Queue: Queue post accepted') print('Queue: Queue post accepted')