From 5d4fff9398b3f378a52297181147121904b0423f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 9 Oct 2020 11:08:01 +0100 Subject: [PATCH] Comments --- newsdaemon.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/newsdaemon.py b/newsdaemon.py index c7567bbe..d6c222b4 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -99,6 +99,9 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str, followersOnly = False useBlurhash = False + # NOTE: the id when the post is created will not be + # consistent (it's based on the current time, not the + # published time), so we change that later blog = createNewsPost(baseDir, domain, port, httpPrefix, rssDescription, followersOnly, False, @@ -116,6 +119,7 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str, currTime = datetime.datetime.utcnow() blog['object']['arrived'] = currTime.strftime("%Y-%m-%dT%H:%M:%SZ") + # change the id, based upon the published time blog['object']['replies']['id'] = idStr blog['object']['replies']['first']['partOf'] = idStr