Send actor updates

master
Bob Mottram 2019-08-20 21:17:40 +01:00
parent dec39a18ce
commit cf8aacf176
1 changed files with 9 additions and 0 deletions

View File

@ -2258,6 +2258,15 @@ class PubServer(BaseHTTPRequestHandler):
if actorChanged: if actorChanged:
with open(actorFilename, 'w') as fp: with open(actorFilename, 'w') as fp:
commentjson.dump(actorJson, fp, indent=4, sort_keys=False) commentjson.dump(actorJson, fp, indent=4, sort_keys=False)
# send actor update to followers
updateActorJson={
'type': 'Update',
'actor': actorJson['id'],
'to': [actorJson['id']+'/followers'],
'object': actorJson
}
self.postToNickname=nickname
self._postToOutbox(updateActorJson)
self._redirect_headers(actorStr,cookie) self._redirect_headers(actorStr,cookie)
self.server.POSTbusy=False self.server.POSTbusy=False
return return