Improve obtaining actor from post path

main
Bob Mottram 2024-05-26 12:57:06 +01:00
parent 3d34b5895a
commit 65aba06e11
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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)