mirror of https://gitlab.com/bashrc2/epicyon
Include context with unwrapped json post
parent
817c63a4ff
commit
7047fe4307
15
daemon.py
15
daemon.py
|
@ -8756,7 +8756,20 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if not includeCreateWrapper and \
|
||||
postJsonObject['type'] == 'Create' and \
|
||||
hasObjectDict(postJsonObject):
|
||||
msg = json.dumps(postJsonObject['object'],
|
||||
unwrappedJson = postJsonObject['object']
|
||||
unwrappedJson['@context'] = [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
{
|
||||
'atomUri': 'ostatus:atomUri',
|
||||
'conversation': 'ostatus:conversation',
|
||||
'inReplyToAtomUri': 'ostatus:inReplyToAtomUri',
|
||||
'ostatus': 'http://ostatus.org#',
|
||||
'sensitive': 'as:sensitive',
|
||||
'toot': 'http://joinmastodon.org/ns#',
|
||||
'votersCount': 'toot:votersCount'
|
||||
}
|
||||
]
|
||||
msg = json.dumps(unwrappedJson,
|
||||
ensure_ascii=False)
|
||||
else:
|
||||
msg = json.dumps(postJsonObject,
|
||||
|
|
Loading…
Reference in New Issue