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 not personJson:
if debug: if debug:
print('DEBUG: Obtaining public key for '+personUrl) 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) personJson = getJson(session,personUrl,asHeader,None,projectVersion,httpPrefix,domain)
if not personJson: if not personJson:
return None return None

View File

@ -209,7 +209,7 @@ def getPosts(session,outboxUrl: str,maxPosts: int, \
if not outboxUrl: if not outboxUrl:
return personPosts 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: if raw:
result = [] result = []
i = 0 i = 0

View File

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