Resolving wordpress-style actors

merge-requests/30/head
Bob Mottram 2023-10-12 13:23:40 +01:00
parent b7800e3fcc
commit 6286c8238a
1 changed files with 4 additions and 5 deletions

View File

@ -215,10 +215,7 @@ def get_user_url(wf_request: {}, source_id: int, debug: bool) -> str:
'contains single user instance actor ' + 'contains single user instance actor ' +
str(source_id) + ' ' + str(link)) str(source_id) + ' ' + str(link))
else: else:
if '/@/' not in link['href']: url = link['href']
url = link['href'].replace('/@', '/users/')
else:
url = link['href']
if not contains_invalid_actor_url_chars(url): if not contains_invalid_actor_url_chars(url):
return remove_html(url) return remove_html(url)
url = link['href'] url = link['href']
@ -367,6 +364,8 @@ def get_person_box(signing_priv_key_pem: str, origin_domain: str,
if not person_url: if not person_url:
return None, None, None, None, None, None, None, None return None, None, None, None, None, None, None, None
print('get_person_box person_url: ' + person_url)
# get the actor json from the url # get the actor json from the url
person_json = \ person_json = \
_get_person_box_actor(session, base_dir, person_url, _get_person_box_actor(session, base_dir, person_url,
@ -5122,7 +5121,7 @@ def get_public_posts_of_person(base_dir: str, nickname: str, domain: str,
sys.exit() sys.exit()
if debug: if debug:
print('Getting the outbox for ' + handle) print('\nGetting the outbox for ' + handle)
(person_url, _, _, person_id, _, _, (person_url, _, _, person_id, _, _,
_, _) = get_person_box(signing_priv_key_pem, _, _) = get_person_box(signing_priv_key_pem,
origin_domain, origin_domain,