mirror of https://gitlab.com/bashrc2/epicyon
Add more debug
parent
763d7c7410
commit
5df3f03396
18
inbox.py
18
inbox.py
|
|
@ -1858,15 +1858,15 @@ def _inbox_after_initial(server, inbox_start_time,
|
||||||
|
|
||||||
handle_name = handle.split('@')[0]
|
handle_name = handle.split('@')[0]
|
||||||
|
|
||||||
#if receive_actor_status(base_dir, person_cache, message_json,
|
if receive_actor_status(base_dir, person_cache, message_json,
|
||||||
# debug):
|
debug):
|
||||||
# if debug:
|
if debug:
|
||||||
# print('DEBUG: ActorStatus from ' + actor)
|
print('DEBUG: ActorStatus from ' + actor)
|
||||||
# fitness_performance(inbox_start_time, server.fitness,
|
fitness_performance(inbox_start_time, server.fitness,
|
||||||
# 'INBOX', '_receive_actor_status',
|
'INBOX', '_receive_actor_status',
|
||||||
# debug)
|
debug)
|
||||||
# inbox_start_time = time.time()
|
inbox_start_time = time.time()
|
||||||
# return False
|
return False
|
||||||
|
|
||||||
if receive_like(recent_posts_cache,
|
if receive_like(recent_posts_cache,
|
||||||
session, handle,
|
session, handle,
|
||||||
|
|
|
||||||
|
|
@ -1095,22 +1095,30 @@ def receive_actor_status(base_dir: str, person_cache: {}, message_json: {},
|
||||||
if message_json['type'] not in ('sm:ActorStatus', 'ActorStatus'):
|
if message_json['type'] not in ('sm:ActorStatus', 'ActorStatus'):
|
||||||
return False
|
return False
|
||||||
if 'content' in message_json:
|
if 'content' in message_json:
|
||||||
return False
|
print('DEBUG: receive_actor_status no content ' + str(message_json))
|
||||||
|
return True
|
||||||
if not isinstance(message_json['content'], str):
|
if not isinstance(message_json['content'], str):
|
||||||
return False
|
print('DEBUG: receive_actor_status content not string ' +
|
||||||
|
str(message_json))
|
||||||
|
return True
|
||||||
if not has_actor(message_json, debug):
|
if not has_actor(message_json, debug):
|
||||||
return False
|
print('DEBUG: receive_actor_status no actor ' +
|
||||||
|
str(message_json))
|
||||||
|
return True
|
||||||
actor_url = get_actor_from_post(message_json)
|
actor_url = get_actor_from_post(message_json)
|
||||||
if not actor_url:
|
if not actor_url:
|
||||||
return False
|
print('DEBUG: receive_actor_status no actor url ' +
|
||||||
|
str(message_json))
|
||||||
|
return True
|
||||||
if not has_users_path(actor_url):
|
if not has_users_path(actor_url):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: "users" or "profile" missing from actor status in ' +
|
print('DEBUG: "users" or "profile" missing from actor status in ' +
|
||||||
str(message_json))
|
str(message_json))
|
||||||
return False
|
return True
|
||||||
actor_json = get_person_from_cache(base_dir, actor_url, person_cache)
|
actor_json = get_person_from_cache(base_dir, actor_url, person_cache)
|
||||||
if not actor_json:
|
if not actor_json:
|
||||||
return False
|
print('DEBUG: receive_actor_status actor not found ' + actor_url)
|
||||||
|
return True
|
||||||
actor_json['sm:status'] = message_json
|
actor_json['sm:status'] = message_json
|
||||||
allow_write_to_file = True
|
allow_write_to_file = True
|
||||||
store_person_in_cache(base_dir, actor_url,
|
store_person_in_cache(base_dir, actor_url,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue