Getting actor for single user instance

main2
Bob Mottram 2019-10-21 17:03:44 +01:00
parent ad16224628
commit 515305f005
1 changed files with 8 additions and 5 deletions

View File

@ -165,12 +165,15 @@ def getPersonBox(baseDir: str,session,wfRequest: {},personCache: {}, \
if not wfRequest.get('errors'):
personUrl = getUserUrl(wfRequest)
else:
personUrl = httpPrefix+'://'+domain+'/users/'+nickname
if nickname=='dev':
# try single user instance
print('getPersonBox: Trying single user instance with ld+json')
personUrl = httpPrefix+'://'+domain
asHeader = {'Accept': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'}
else:
personUrl = httpPrefix+'://'+domain+'/users/'+nickname
if not personUrl:
# try single user instance
personUrl = httpPrefix+'://'+domain
asHeader = {'Accept': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'}
#return None,None,None,None,None,None,None,None
return None,None,None,None,None,None,None,None
personJson = getPersonFromCache(baseDir,personUrl,personCache)
if not personJson:
if '/channel/' in personUrl: