From f7419c1f21d59bddf35c1a097cce08fd7ae158e5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 23 Sep 2019 21:31:49 +0100 Subject: [PATCH] Tidying --- posts.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/posts.py b/posts.py index 613bdccf2..215b3a64c 100644 --- a/posts.py +++ b/posts.py @@ -1861,9 +1861,18 @@ def createBoxBase(baseDir: str,boxname: str, \ # get the post as json p = json.loads(postStr) - if (boxname!='dm' and boxname!='replies') or \ - (boxname=='dm' and isDM(p)) or \ - (boxname=='replies' and (isReply(p,boxActor) or isDM(p))): + isTimelinePost=False + if (boxname!='dm' and boxname!='replies'): + isTimelinePost=True + else: + if boxname=='dm': + if isDM(p): + isTimelinePost=True + elif boxname=='replies': + if isDM(p) or isReply(p,boxActor): + isTimelinePost=True + + if isTimelinePost: # remove any capability so that it's not displayed if p.get('capability'): del p['capability']