diff --git a/posts.py b/posts.py index 38c912027..f82f17448 100644 --- a/posts.py +++ b/posts.py @@ -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: diff --git a/webinterface.py b/webinterface.py index 12023daa5..2cc5af746 100644 --- a/webinterface.py +++ b/webinterface.py @@ -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')