From b0bd93e52d4e6b926ef1e9ac3a910193a1a12704 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 11 Oct 2019 18:12:24 +0100 Subject: [PATCH] Remove trailing activity --- inbox.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inbox.py b/inbox.py index bb8b55a88..a7f281bc1 100644 --- a/inbox.py +++ b/inbox.py @@ -1385,7 +1385,10 @@ def inboxUpdateCalendar(baseDir: str,handle: str,postJsonObject: {}) -> None: if not os.path.isdir(calendarPath+'/'+str(eventYear)): os.mkdir(calendarPath+'/'+str(eventYear)) calendarFilename=calendarPath+'/'+str(eventYear)+'/'+str(eventMonthNumber)+'.txt' - postId=postJsonObject['id'].replace('/','#') + postId=postJsonObject['id'] + if '#' in postId: + postId=postId.split('#')[0] + postId=postId.replace('/','#') if os.path.isfile(calendarFilename): if postId in open(calendarFilename).read(): return