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 \
|
if not includeCreateWrapper and \
|
||||||
postJsonObject['type'] == 'Create' and \
|
postJsonObject['type'] == 'Create' and \
|
||||||
hasObjectDict(postJsonObject):
|
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)
|
ensure_ascii=False)
|
||||||
else:
|
else:
|
||||||
msg = json.dumps(postJsonObject,
|
msg = json.dumps(postJsonObject,
|
||||||
|
|
Loading…
Reference in New Issue