From f3af1bb68d33e41d0f541ef33f2b982ab6dd71b7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 1 Dec 2019 14:40:32 +0000 Subject: [PATCH] String conversion --- posts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/posts.py b/posts.py index 05da2c3b..a129f1ae 100644 --- a/posts.py +++ b/posts.py @@ -2667,7 +2667,8 @@ def mutePost(baseDir: str,nickname: str,domain: str,postId: str, \ if postId in recentPostsCache['index']: print('MUTE: '+postId+' is in recent posts cache') if recentPostsCache['json'].get(postId): - recentPostsCache['json'][postId]['muted']=True + postJsonObject['muted']=True + recentPostsCache['json'][postId]=json.dumps(postJsonObject) print('MUTE: '+postId+' marked as muted in recent posts cache') def unmutePost(baseDir: str,nickname: str,domain: str,postId: str, \ @@ -2697,5 +2698,6 @@ def unmutePost(baseDir: str,nickname: str,domain: str,postId: str, \ if postId in recentPostsCache['index']: print('UNMUTE: '+postId+' is in recent posts cache') if recentPostsCache['json'].get(postId): - recentPostsCache['json'][postId]['muted']=False + postJsonObject['muted']=False + recentPostsCache['json'][postId]=json.dumps(postJsonObject) print('UNMUTE: '+postId+' marked as not muted in recent posts cache')