mirror of https://gitlab.com/bashrc2/epicyon
Check that published is defined
parent
a1d95eafe6
commit
e7bd906a1b
4
inbox.py
4
inbox.py
|
@ -552,6 +552,7 @@ def save_post_to_inbox_queue(base_dir: str, http_prefix: str,
|
||||||
curr_time = date_utcnow()
|
curr_time = date_utcnow()
|
||||||
|
|
||||||
post_id = None
|
post_id = None
|
||||||
|
published = ''
|
||||||
if post_json_object.get('id'):
|
if post_json_object.get('id'):
|
||||||
post_id = remove_id_ending(post_json_object['id'])
|
post_id = remove_id_ending(post_json_object['id'])
|
||||||
published = curr_time.strftime("%Y-%m-%dT%H:%M:%SZ")
|
published = curr_time.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||||
|
@ -564,6 +565,9 @@ def save_post_to_inbox_queue(base_dir: str, http_prefix: str,
|
||||||
local_actor_url(http_prefix, nickname, original_domain) + \
|
local_actor_url(http_prefix, nickname, original_domain) + \
|
||||||
'/statuses/' + status_number
|
'/statuses/' + status_number
|
||||||
|
|
||||||
|
if not published:
|
||||||
|
return None
|
||||||
|
|
||||||
# NOTE: don't change post_json_object['id'] before signature check
|
# NOTE: don't change post_json_object['id'] before signature check
|
||||||
|
|
||||||
inbox_queue_dir = create_inbox_queue_dir(nickname, domain, base_dir)
|
inbox_queue_dir = create_inbox_queue_dir(nickname, domain, base_dir)
|
||||||
|
|
Loading…
Reference in New Issue