From 324ab9bf2a99c2d07e1991c2d3447eb2eae79a22 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 31 Oct 2019 10:04:49 +0000 Subject: [PATCH] Don't show shares if unauthorised --- posts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/posts.py b/posts.py index 00092de30..a4a0af40b 100644 --- a/posts.py +++ b/posts.py @@ -2138,7 +2138,7 @@ def createBoxBase(session,baseDir: str,boxname: str, \ # remove any capability so that it's not displayed if p.get('capability'): del p['capability'] - # Don't show likes or replies to unauthorized viewers + # Don't show likes, replies or shares (announces) to unauthorized viewers if not authorized: if p.get('object'): if isinstance(p['object'], dict): @@ -2146,6 +2146,8 @@ def createBoxBase(session,baseDir: str,boxname: str, \ p['likes']={} if p['object'].get('replies'): p['replies']={} + if p['object'].get('shares'): + p['shares']={} # insert it into the box feed if postsOnPageCtr < itemsPerPage: if not headerOnly: