Set id on pinned post json

main
Bob Mottram 2021-01-25 14:56:41 +00:00
parent 2b1bb3e82f
commit 545f5d0523
1 changed files with 5 additions and 0 deletions

View File

@ -10170,6 +10170,11 @@ class PubServer(BaseHTTPRequestHandler):
self.server.domain,
self.server.port,
pinnedPostJson)
messageJson['id'] = pinnedPostJson['id'] + '/activity'
messageJson['object']['id'] = pinnedPostJson['id']
messageJson['object']['url'] = \
pinnedPostJson['id'].replace('/users/', '/@')
messageJson['object']['atomUri'] = pinnedPostJson['id']
msg = json.dumps(messageJson,
ensure_ascii=False).encode('utf-8')
msglen = len(msg)