mirror of https://gitlab.com/bashrc2/epicyon
Improve obtaining actor from post path
parent
3d34b5895a
commit
65aba06e11
3
cache.py
3
cache.py
|
@ -11,6 +11,7 @@ import os
|
|||
from session import url_exists
|
||||
from session import get_json
|
||||
from session import get_json_valid
|
||||
from utils import contains_statuses
|
||||
from utils import load_json
|
||||
from utils import save_json
|
||||
from utils import get_file_case_insensitive
|
||||
|
@ -82,7 +83,7 @@ def store_person_in_cache(base_dir: str, person_url: str,
|
|||
allow_write_to_file: bool) -> None:
|
||||
"""Store an actor in the cache
|
||||
"""
|
||||
if 'statuses' in person_url or person_url.endswith('/actor'):
|
||||
if contains_statuses(person_url) or person_url.endswith('/actor'):
|
||||
# This is not an actor or person account
|
||||
return
|
||||
|
||||
|
|
2
inbox.py
2
inbox.py
|
@ -3739,7 +3739,7 @@ def _obtain_avatar_for_reply_post(session, base_dir: str, http_prefix: str,
|
|||
return
|
||||
|
||||
if '/statuses/' in lookup_actor:
|
||||
lookup_actor = lookup_actor.split('/statuses/')[0]
|
||||
lookup_actor = get_actor_from_post_id(lookup_actor)
|
||||
|
||||
if debug:
|
||||
print('DEBUG: Obtaining actor for reply post ' + lookup_actor)
|
||||
|
|
Loading…
Reference in New Issue