From a15e905052080a7c4e9f2c19170b58d16c7641f0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 27 Sep 2021 20:34:32 +0100 Subject: [PATCH] Remove html for muted posts --- blocking.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blocking.py b/blocking.py index 68b1e3e74..eb1c7cc7a 100644 --- a/blocking.py +++ b/blocking.py @@ -537,6 +537,8 @@ def mutePost(baseDir: str, nickname: str, domain: str, port: int, del recentPostsCache['html'][postId] print('MUTE: ' + postId + ' marked as muted in recent posts memory cache') + if recentPostsCache['html'].get(postId): + del recentPostsCache['html'][postId] def unmutePost(baseDir: str, nickname: str, domain: str, port: int, @@ -613,6 +615,8 @@ def unmutePost(baseDir: str, nickname: str, domain: str, port: int, del recentPostsCache['html'][postId] print('UNMUTE: ' + postId + ' marked as unmuted in recent posts cache') + if recentPostsCache['html'].get(postId): + del recentPostsCache['html'][postId] def outboxMute(baseDir: str, httpPrefix: str,