forked from indymedia/epicyon
New post context
parent
7bb41b4414
commit
426873d0a9
16
posts.py
16
posts.py
|
@ -575,7 +575,17 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
|
||||||
"type": "Place",
|
"type": "Place",
|
||||||
"name": location
|
"name": location
|
||||||
})
|
})
|
||||||
|
|
||||||
|
postContext=[
|
||||||
|
'https://www.w3.org/ns/activitystreams',
|
||||||
|
{
|
||||||
|
'Hashtag': 'as:Hashtag',
|
||||||
|
'sensitive': 'as:sensitive',
|
||||||
|
'toot': 'http://joinmastodon.org/ns#',
|
||||||
|
'votersCount': 'toot:votersCount'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
if not clientToServer:
|
if not clientToServer:
|
||||||
actorUrl=httpPrefix+'://'+domain+'/users/'+nickname
|
actorUrl=httpPrefix+'://'+domain+'/users/'+nickname
|
||||||
|
|
||||||
|
@ -599,7 +609,7 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
tries+=1
|
tries+=1
|
||||||
newPost = {
|
newPost = {
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": postContext,
|
||||||
'id': newPostId+'/activity',
|
'id': newPostId+'/activity',
|
||||||
'capability': capabilityIdList,
|
'capability': capabilityIdList,
|
||||||
'type': 'Create',
|
'type': 'Create',
|
||||||
|
@ -644,7 +654,7 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \
|
||||||
mediaType,imageDescription,useBlurhash)
|
mediaType,imageDescription,useBlurhash)
|
||||||
else:
|
else:
|
||||||
newPost = {
|
newPost = {
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": postContext,
|
||||||
'id': newPostId,
|
'id': newPostId,
|
||||||
'type': 'Note',
|
'type': 'Note',
|
||||||
'summary': summary,
|
'summary': summary,
|
||||||
|
|
Loading…
Reference in New Issue