From e3e88de0d8deea8194a8f3579e013933396c1553 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 27 Nov 2020 10:25:10 +0000 Subject: [PATCH] Moderator can remove blogs from the news actor --- daemon.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/daemon.py b/daemon.py index 156b4b9f..85f8f56c 100644 --- a/daemon.py +++ b/daemon.py @@ -1519,9 +1519,7 @@ class PubServer(BaseHTTPRequestHandler): moderationText) if postFilename: if canRemovePost(baseDir, - nickname, - domain, - port, + nickname, domain, port, moderationText): deletePost(baseDir, httpPrefix, @@ -1529,6 +1527,23 @@ class PubServer(BaseHTTPRequestHandler): postFilename, debug, self.server.recentPostsCache) + if nickname != 'news': + # if this is a local blog post then also remove it + # from the news actor + postFilename = \ + locatePost(baseDir, 'news', domain, + moderationText) + if postFilename: + if canRemovePost(baseDir, + 'news', domain, port, + moderationText): + deletePost(baseDir, + httpPrefix, + 'news', domain, + postFilename, + debug, + self.server.recentPostsCache) + if callingDomain.endswith('.onion') and onionDomain: actorStr = 'http://' + onionDomain + usersPath elif (callingDomain.endswith('.i2p') and i2pDomain):