mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-01 02:15:12 +00:00
Don't remove replies to blog posts, including attachments
This commit is contained in:
1 parent
7d6a47d967
commit
e4a9db57ce
1 file changed
+6
-3
@@ -440,6 +440,11 @@ def deletePost(baseDir: str, httpPrefix: str,
|
||||
if bookmarkIndex in open(bookmarksIndexFilename).read():
|
||||
return
|
||||
|
||||
# don't remove replies to blog posts
|
||||
if isReplyToBlogPost(baseDir, nickname, domain,
|
||||
postJsonObject):
|
||||
return
|
||||
|
||||
# remove any attachment
|
||||
removeAttachment(baseDir, httpPrefix, domain, postJsonObject)
|
||||
|
||||
@@ -453,9 +458,7 @@ def deletePost(baseDir: str, httpPrefix: str,
|
||||
getCachedPostFilename(baseDir, nickname, domain, postJsonObject)
|
||||
if cachedPostFilename:
|
||||
if os.path.isfile(cachedPostFilename):
|
||||
if not isReplyToBlogPost(baseDir, nickname, domain,
|
||||
postJsonObject):
|
||||
os.remove(cachedPostFilename)
|
||||
os.remove(cachedPostFilename)
|
||||
# removePostFromCache(postJsonObject,recentPostsCache)
|
||||
|
||||
hasObject = False
|
||||
|
||||
Reference in new issue
Block a user