master
Bob Mottram 2019-08-22 17:15:02 +01:00
parent eacb37be48
commit 95218f9945
2 changed files with 11 additions and 10 deletions

View File

@ -2263,17 +2263,19 @@ class PubServer(BaseHTTPRequestHandler):
# also copy to the actors cache and personCache in memory
storePersonInCache(self.server.baseDir,actorJson['id'],actorJson,self.server.personCache)
actorCacheFilename=self.server.baseDir+'/cache/actors/'+actorJson['id'].replace('/','#')+'.json'
pprint(actorJson)
print('*************************updating actor cache: '+actorCacheFilename)
with open(actorCacheFilename, 'w') as fp:
commentjson.dump(actorJson, fp, indent=4, sort_keys=False)
# send actor update to followers
updateActorJson={
'type': 'Update',
'actor': actorJson['id'],
'to': ['https://www.w3.org/ns/activitystreams#Public'],
'object': actorJson
}
self.postToNickname=nickname
self._postToOutbox(updateActorJson)
# send actor update to followers
updateActorJson={
'type': 'Update',
'actor': actorJson['id'],
'to': ['https://www.w3.org/ns/activitystreams#Public'],
'object': actorJson
}
self.postToNickname=nickname
self._postToOutbox(updateActorJson)
self._redirect_headers(actorStr,cookie)
self.server.POSTbusy=False
return

View File

@ -1130,7 +1130,6 @@ def individualPostAsHtml(baseDir: str, \
messageId=postJsonObject['id'].replace('/activity','')
preferredName=getPreferredName(postJsonObject['actor'],personCache)
print('***************** getPreferredName: '+postJsonObject['actor']+ ' = '+preferredName)
if preferredName:
titleStr+='<a href="'+messageId+'">'+preferredName+'</a>'
else: