From 4dccb042b0323338a914bed6cad86f20a5c6a0ac Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 10 Aug 2019 12:51:54 +0100 Subject: [PATCH] Only public posts with hashtags are indexed --- posts.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/posts.py b/posts.py index adda0f61..764ff254 100644 --- a/posts.py +++ b/posts.py @@ -435,7 +435,13 @@ def createPostBase(baseDir: str,nickname: str, domain: str, port: int, \ if hashtagsDict: for tagName,tag in hashtagsDict.items(): tags.append(tag) - updateHashtagsIndex(baseDir,tag,newPostId) + isPublic=False + for recipient in toRecipients: + if recipient.endswith('#Public'): + isPublic=True + break + if isPublic: + updateHashtagsIndex(baseDir,tag,newPostId) if not clientToServer: actorUrl=httpPrefix+'://'+domain+'/users/'+nickname