Use activity instead of ld

master
Bob Mottram 2019-09-01 13:09:29 +01:00
parent eb2f67bba1
commit c8142aa022
3 changed files with 4 additions and 4 deletions

View File

@ -99,7 +99,7 @@ def getPersonPubKey(baseDir: str,session,personUrl: str, \
if not personJson:
if debug:
print('DEBUG: Obtaining public key for '+personUrl)
asHeader = {'Accept': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'}
asHeader = {'Accept': 'application/activity+json; profile="https://www.w3.org/ns/activitystreams"'}
personJson = getJson(session,personUrl,asHeader,None,projectVersion,httpPrefix,domain)
if not personJson:
return None

View File

@ -209,7 +209,7 @@ def getPosts(session,outboxUrl: str,maxPosts: int, \
if not outboxUrl:
return personPosts
asHeader = {'Accept': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'}
asHeader = {'Accept': 'application/activity+json; profile="https://www.w3.org/ns/activitystreams"'}
if raw:
result = []
i = 0

View File

@ -2210,14 +2210,14 @@ def htmlProfileAfterSearch(baseDir: str,path: str,httpPrefix: str, \
profileStr=''
with open(baseDir+'/epicyon-profile.css', 'r') as cssFile:
wf = webfingerHandle(session,searchNickname+'@'+searchDomainFull,httpPrefix,wfRequest, \
None,projectVersion)
domain,projectVersion)
if not wf:
if debug:
print('DEBUG: Unable to webfinger '+searchNickname+'@'+searchDomainFull)
return None
asHeader = {'Accept': 'application/activity+json; profile="https://www.w3.org/ns/activitystreams"'}
personUrl = getUserUrl(wf)
profileJson = getJson(session,personUrl,asHeader,None,projectVersion,httpPrefix,None)
profileJson = getJson(session,personUrl,asHeader,None,projectVersion,httpPrefix,domain)
if not profileJson:
if debug:
print('DEBUG: No actor returned from '+personUrl)