mirror of https://gitlab.com/bashrc2/epicyon
Getting instance actor
parent
187a2b9dd5
commit
33578b0842
11
person.py
11
person.py
|
@ -1305,6 +1305,14 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool,
|
||||||
if nickname == 'inbox':
|
if nickname == 'inbox':
|
||||||
nickname = domain
|
nickname = domain
|
||||||
|
|
||||||
|
personUrl = None
|
||||||
|
wfRequest = None
|
||||||
|
if '://' in originalActor and \
|
||||||
|
originalActor.lower().endswith('/actor'):
|
||||||
|
if debug:
|
||||||
|
print(originalActor + ' is an instance actor')
|
||||||
|
personUrl = originalActor
|
||||||
|
else:
|
||||||
handle = nickname + '@' + domain
|
handle = nickname + '@' + domain
|
||||||
wfRequest = webfingerHandle(session, handle,
|
wfRequest = webfingerHandle(session, handle,
|
||||||
httpPrefix, cachedWebfingers,
|
httpPrefix, cachedWebfingers,
|
||||||
|
@ -1323,7 +1331,6 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool,
|
||||||
if not quiet:
|
if not quiet:
|
||||||
pprint(wfRequest)
|
pprint(wfRequest)
|
||||||
|
|
||||||
personUrl = None
|
|
||||||
if wfRequest.get('errors'):
|
if wfRequest.get('errors'):
|
||||||
if not quiet or debug:
|
if not quiet or debug:
|
||||||
print('getActorJson wfRequest error: ' +
|
print('getActorJson wfRequest error: ' +
|
||||||
|
@ -1339,7 +1346,7 @@ def getActorJson(hostDomain: str, handle: str, http: bool, gnunet: bool,
|
||||||
headersList = (
|
headersList = (
|
||||||
"activity+json", "ld+json", "jrd+json"
|
"activity+json", "ld+json", "jrd+json"
|
||||||
)
|
)
|
||||||
if not personUrl:
|
if not personUrl and wfRequest:
|
||||||
personUrl = getUserUrl(wfRequest, 0, debug)
|
personUrl = getUserUrl(wfRequest, 0, debug)
|
||||||
if nickname == domain:
|
if nickname == domain:
|
||||||
paths = getUserPaths()
|
paths = getUserPaths()
|
||||||
|
|
1
utils.py
1
utils.py
|
@ -1648,6 +1648,7 @@ def _getReservedWords() -> str:
|
||||||
'tlblogs', 'tlfeatures',
|
'tlblogs', 'tlfeatures',
|
||||||
'moderation', 'moderationaction',
|
'moderation', 'moderationaction',
|
||||||
'activity', 'undo', 'pinned',
|
'activity', 'undo', 'pinned',
|
||||||
|
'actor', 'Actor',
|
||||||
'reply', 'replies', 'question', 'like',
|
'reply', 'replies', 'question', 'like',
|
||||||
'likes', 'users', 'statuses', 'tags',
|
'likes', 'users', 'statuses', 'tags',
|
||||||
'accounts', 'headers',
|
'accounts', 'headers',
|
||||||
|
|
Loading…
Reference in New Issue