mirror of https://gitlab.com/bashrc2/epicyon
Don't remove replies to blog posts, including attachments
parent
7d6a47d967
commit
e4a9db57ce
9
utils.py
9
utils.py
|
@ -440,6 +440,11 @@ def deletePost(baseDir: str, httpPrefix: str,
|
||||||
if bookmarkIndex in open(bookmarksIndexFilename).read():
|
if bookmarkIndex in open(bookmarksIndexFilename).read():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# don't remove replies to blog posts
|
||||||
|
if isReplyToBlogPost(baseDir, nickname, domain,
|
||||||
|
postJsonObject):
|
||||||
|
return
|
||||||
|
|
||||||
# remove any attachment
|
# remove any attachment
|
||||||
removeAttachment(baseDir, httpPrefix, domain, postJsonObject)
|
removeAttachment(baseDir, httpPrefix, domain, postJsonObject)
|
||||||
|
|
||||||
|
@ -453,9 +458,7 @@ def deletePost(baseDir: str, httpPrefix: str,
|
||||||
getCachedPostFilename(baseDir, nickname, domain, postJsonObject)
|
getCachedPostFilename(baseDir, nickname, domain, postJsonObject)
|
||||||
if cachedPostFilename:
|
if cachedPostFilename:
|
||||||
if os.path.isfile(cachedPostFilename):
|
if os.path.isfile(cachedPostFilename):
|
||||||
if not isReplyToBlogPost(baseDir, nickname, domain,
|
os.remove(cachedPostFilename)
|
||||||
postJsonObject):
|
|
||||||
os.remove(cachedPostFilename)
|
|
||||||
# removePostFromCache(postJsonObject,recentPostsCache)
|
# removePostFromCache(postJsonObject,recentPostsCache)
|
||||||
|
|
||||||
hasObject = False
|
hasObject = False
|
||||||
|
|
Loading…
Reference in New Issue