From 2d7e6f4f432cc0fb4c6e84add11fdb4e1bae8eb4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 6 Oct 2020 10:47:58 +0100 Subject: [PATCH] Blog posts going into the newswire may not always be local. They may be whatever federated to each users blog timeline. --- newswire.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/newswire.py b/newswire.py index 835b462e4..46638c5bf 100644 --- a/newswire.py +++ b/newswire.py @@ -241,9 +241,9 @@ def isTrustedByNewswire(baseDir: str, nickname: str) -> bool: return False -def addLocalBlogsToNewswire(baseDir: str, newswire: {}, - maxBlogsPerAccount: int) -> None: - """Adds blogs from this instance into the newswire +def addBlogsToNewswire(baseDir: str, newswire: {}, + maxBlogsPerAccount: int) -> None: + """Adds blogs from each user account into the newswire """ # go through each account for subdir, dirs, files in os.walk(baseDir + '/accounts'): @@ -292,8 +292,8 @@ def getDictFromNewswire(session, baseDir: str) -> {}: for dateStr, item in itemsList.items(): result[dateStr] = item - # add local content - addLocalBlogsToNewswire(baseDir, result, 5) + # add blogs from each user account + addBlogsToNewswire(baseDir, result, 5) # sort into chronological order, latest first sortedResult = OrderedDict(sorted(result.items(), reverse=True))