Remove muted post from cache

merge-requests/6/head
Bob Mottram 2019-12-01 15:19:11 +00:00
parent ac8bb75f41
commit 37f2ae5776
1 changed files with 2 additions and 10 deletions

View File

@ -2694,12 +2694,4 @@ def unmutePost(baseDir: str,nickname: str,domain: str,postId: str, \
if cachedPostFilename:
if os.path.isfile(cachedPostFilename):
os.remove(cachedPostFilename)
# if the post is in the recent posts cache then mark it as not muted
if recentPostsCache.get('index'):
postId=postJsonObject['id'].replace('/activity','').replace('/','#')
if postId in recentPostsCache['index']:
print('UNMUTE: '+postId+' is in recent posts cache')
if recentPostsCache['json'].get(postId):
postJsonObject['muted']=False
recentPostsCache['json'][postId]=json.dumps(postJsonObject)
print('UNMUTE: '+postId+' marked as not muted in recent posts cache')
removePostFromCache(postJsonObject,recentPostsCache)