Use actor if webfinger fails

main2
Bob Mottram 2019-10-17 16:18:43 +01:00
parent 2f716975e4
commit dd82f0b7c3
2 changed files with 7 additions and 2 deletions

View File

@ -1345,7 +1345,7 @@ def sendSignedJson(postJsonObject: {},session,baseDir: str, \
if wfRequest.get('errors'):
if debug:
print('DEBUG: webfinger for '+handle+' failed with errors '+str(wfRequest['errors']))
print('DEBUG: webfinger for '+handle+' failed with errors '+str(wfRequest['errors']))
return 1
if not clientToServer:

View File

@ -3166,8 +3166,13 @@ def htmlProfileAfterSearch(translate: {}, \
if debug:
print('DEBUG: Unable to webfinger '+searchNickname+'@'+searchDomainFull)
return None
personUrl=None
if wf.get('errors'):
personUrl=httpPrefix+'://'+searchDomainFull+'/users/'+searchNickname
asHeader = {'Accept': 'application/activity+json; profile="https://www.w3.org/ns/activitystreams"'}
personUrl = getUserUrl(wf)
if not personUrl:
personUrl = getUserUrl(wf)
if not personUrl:
if debug:
print('DEBUG: Webfinger did not return an actor url')