Remove html even if post is not in index

main
Bob Mottram 2021-09-27 20:58:22 +01:00
parent de23673fa2
commit 1bb2bf9cc9
1 changed files with 8 additions and 8 deletions

View File

@ -534,10 +534,10 @@ def mutePost(baseDir: str, nickname: str, domain: str, port: int,
recentPostsCache['json'][postId] = json.dumps(postJsonObject)
print('MUTE: ' + postId +
' marked as muted in recent posts memory cache')
if recentPostsCache.get('html'):
if recentPostsCache['html'].get(postId):
del recentPostsCache['html'][postId]
print('MUTE: ' + postId + ' removed cached html')
if recentPostsCache.get('html'):
if recentPostsCache['html'].get(postId):
del recentPostsCache['html'][postId]
print('MUTE: ' + postId + ' removed cached html')
def unmutePost(baseDir: str, nickname: str, domain: str, port: int,
@ -611,10 +611,10 @@ def unmutePost(baseDir: str, nickname: str, domain: str, port: int,
recentPostsCache['json'][postId] = json.dumps(postJsonObject)
print('UNMUTE: ' + postId +
' marked as unmuted in recent posts cache')
if recentPostsCache.get('html'):
if recentPostsCache['html'].get(postId):
del recentPostsCache['html'][postId]
print('UNMUTE: ' + postId + ' removed cached html')
if recentPostsCache.get('html'):
if recentPostsCache['html'].get(postId):
del recentPostsCache['html'][postId]
print('UNMUTE: ' + postId + ' removed cached html')
def outboxMute(baseDir: str, httpPrefix: str,