mirror of https://gitlab.com/bashrc2/epicyon
Remove muted post from cache
parent
ac8bb75f41
commit
37f2ae5776
10
posts.py
10
posts.py
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue