forked from indymedia/epicyon
Get actor for single user instance
parent
515305f005
commit
4bc0d11a7c
12
posts.py
12
posts.py
|
@ -119,13 +119,11 @@ def getUserUrl(wfRequest: {}) -> str:
|
||||||
for link in wfRequest['links']:
|
for link in wfRequest['links']:
|
||||||
if link.get('type') and link.get('href'):
|
if link.get('type') and link.get('href'):
|
||||||
if link['type'] == 'application/activity+json':
|
if link['type'] == 'application/activity+json':
|
||||||
if '/users/' in link['href'] or \
|
if not ('/users/' in link['href'] or \
|
||||||
'/profile/' in link['href'] or \
|
'/profile/' in link['href'] or \
|
||||||
'/channel/' in link['href']:
|
'/channel/' in link['href']):
|
||||||
return link['href']
|
print('Webfinger activity+json contains single user instance actor')
|
||||||
else:
|
return link['href']
|
||||||
print('Webfinger activity+json does not contain a valid actor')
|
|
||||||
print(link['href'])
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def parseUserFeed(session,feedUrl: str,asHeader: {}, \
|
def parseUserFeed(session,feedUrl: str,asHeader: {}, \
|
||||||
|
|
Loading…
Reference in New Issue