String conversion

main
Bob Mottram 2019-12-01 14:40:32 +00:00
parent c125d4dc69
commit f3af1bb68d
1 changed files with 4 additions and 2 deletions

View File

@ -2667,7 +2667,8 @@ def mutePost(baseDir: str,nickname: str,domain: str,postId: str, \
if postId in recentPostsCache['index']: if postId in recentPostsCache['index']:
print('MUTE: '+postId+' is in recent posts cache') print('MUTE: '+postId+' is in recent posts cache')
if recentPostsCache['json'].get(postId): 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') print('MUTE: '+postId+' marked as muted in recent posts cache')
def unmutePost(baseDir: str,nickname: str,domain: str,postId: str, \ 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']: if postId in recentPostsCache['index']:
print('UNMUTE: '+postId+' is in recent posts cache') print('UNMUTE: '+postId+' is in recent posts cache')
if recentPostsCache['json'].get(postId): 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') print('UNMUTE: '+postId+' marked as not muted in recent posts cache')