mirror of https://gitlab.com/bashrc2/epicyon
Check that path exists
parent
0af6b09840
commit
0df15cca0e
2
posts.py
2
posts.py
|
@ -6154,9 +6154,11 @@ def download_announce(session, base_dir: str, http_prefix: str,
|
|||
base_dir, nickname, domain, post_id,
|
||||
recent_posts_cache)
|
||||
return None
|
||||
|
||||
announced_actor = announced_json['id']
|
||||
if announced_json.get('attributedTo'):
|
||||
announced_actor = get_attributed_to(announced_json['attributedTo'])
|
||||
|
||||
if not announced_json.get('type'):
|
||||
print('WARN: announced post does not have a type ' +
|
||||
str(announced_json))
|
||||
|
|
3
utils.py
3
utils.py
|
@ -745,6 +745,9 @@ def get_locked_account(actor_json: {}) -> bool:
|
|||
def has_users_path(path_str: str) -> bool:
|
||||
"""Whether there is a /users/ path (or equivalent) in the given string
|
||||
"""
|
||||
if not path_str:
|
||||
return False
|
||||
|
||||
users_list = get_user_paths()
|
||||
for users_str in users_list:
|
||||
if users_str in path_str:
|
||||
|
|
Loading…
Reference in New Issue