mirror of https://gitlab.com/bashrc2/epicyon
More robust bold reading detection
parent
15795248d7
commit
4ea1f7e1bd
14
inbox.py
14
inbox.py
|
@ -3350,7 +3350,7 @@ def _inbox_after_initial(server,
|
|||
cw_lists: {}, lists_enabled: str,
|
||||
content_license_url: str,
|
||||
languages_understood: [],
|
||||
mitm: bool) -> bool:
|
||||
mitm: bool, bold_reading: bool) -> bool:
|
||||
""" Anything which needs to be done after initial checks have passed
|
||||
"""
|
||||
# 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]
|
||||
|
||||
bold_reading = False
|
||||
if server.bold_reading.get(handle_name):
|
||||
bold_reading = True
|
||||
|
||||
if _receive_like(recent_posts_cache,
|
||||
session, handle, is_group,
|
||||
base_dir, http_prefix,
|
||||
|
@ -4807,6 +4803,11 @@ def run_inbox_queue(server,
|
|||
mitm = False
|
||||
if queue_json.get('mitm'):
|
||||
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,
|
||||
recent_posts_cache,
|
||||
max_recent_posts,
|
||||
|
@ -4838,7 +4839,8 @@ def run_inbox_queue(server,
|
|||
default_reply_interval_hrs,
|
||||
cw_lists, lists_enabled,
|
||||
content_license_url,
|
||||
languages_understood, mitm)
|
||||
languages_understood, mitm,
|
||||
bold_reading)
|
||||
if debug:
|
||||
pprint(queue_json['post'])
|
||||
print('Queue: Queue post accepted')
|
||||
|
|
Loading…
Reference in New Issue