From 426873d0a99c827c6aa8dfb2e5572e8d205c743f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 19 Oct 2019 16:59:49 +0100 Subject: [PATCH] New post context --- posts.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/posts.py b/posts.py index 694e6cc0..10ada818 100644 --- a/posts.py +++ b/posts.py @@ -575,7 +575,17 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \ "type": "Place", "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: actorUrl=httpPrefix+'://'+domain+'/users/'+nickname @@ -599,7 +609,7 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \ time.sleep(1) tries+=1 newPost = { - "@context": "https://www.w3.org/ns/activitystreams", + "@context": postContext, 'id': newPostId+'/activity', 'capability': capabilityIdList, 'type': 'Create', @@ -644,7 +654,7 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \ mediaType,imageDescription,useBlurhash) else: newPost = { - "@context": "https://www.w3.org/ns/activitystreams", + "@context": postContext, 'id': newPostId, 'type': 'Note', 'summary': summary,