forked from indymedia/epicyon
More debug
parent
ddaa94146f
commit
22f7f57b74
7
posts.py
7
posts.py
|
@ -142,7 +142,12 @@ def cleanHtml(rawHtml: str) -> str:
|
||||||
|
|
||||||
|
|
||||||
def getUserUrl(wfRequest: {}) -> str:
|
def getUserUrl(wfRequest: {}) -> str:
|
||||||
|
"""Gets the actor url from a webfinger request
|
||||||
|
"""
|
||||||
|
print('getUserUrl: ' + str(wfRequest))
|
||||||
if not wfRequest.get('links'):
|
if not wfRequest.get('links'):
|
||||||
|
print('getUserUrl webfinger activity+json contains no links ' +
|
||||||
|
str(wfRequest))
|
||||||
return None
|
return None
|
||||||
for link in wfRequest['links']:
|
for link in wfRequest['links']:
|
||||||
if not (link.get('type') and link.get('href')):
|
if not (link.get('type') and link.get('href')):
|
||||||
|
@ -153,7 +158,7 @@ def getUserUrl(wfRequest: {}) -> str:
|
||||||
'/accounts/' in link['href'] or
|
'/accounts/' in link['href'] or
|
||||||
'/profile/' in link['href'] or
|
'/profile/' in link['href'] or
|
||||||
'/channel/' in link['href']):
|
'/channel/' in link['href']):
|
||||||
print('Webfinger activity+json ' +
|
print('getUserUrl webfinger activity+json ' +
|
||||||
'contains single user instance actor ' +
|
'contains single user instance actor ' +
|
||||||
str(link))
|
str(link))
|
||||||
return link['href']
|
return link['href']
|
||||||
|
|
Loading…
Reference in New Issue