mirror of https://gitlab.com/bashrc2/epicyon
Check for index
parent
f3af1bb68d
commit
4d3dab83ae
2
posts.py
2
posts.py
|
@ -2663,6 +2663,7 @@ def mutePost(baseDir: str,nickname: str,domain: str,postId: str, \
|
||||||
os.remove(cachedPostFilename)
|
os.remove(cachedPostFilename)
|
||||||
|
|
||||||
# if the post is in the recent posts cache then mark it as muted
|
# if the post is in the recent posts cache then mark it as muted
|
||||||
|
if recentPostsCache.get('index'):
|
||||||
postId=postJsonObject['id'].replace('/activity','').replace('/','#')
|
postId=postJsonObject['id'].replace('/activity','').replace('/','#')
|
||||||
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')
|
||||||
|
@ -2694,6 +2695,7 @@ def unmutePost(baseDir: str,nickname: str,domain: str,postId: str, \
|
||||||
if os.path.isfile(cachedPostFilename):
|
if os.path.isfile(cachedPostFilename):
|
||||||
os.remove(cachedPostFilename)
|
os.remove(cachedPostFilename)
|
||||||
# if the post is in the recent posts cache then mark it as not muted
|
# 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('/','#')
|
postId=postJsonObject['id'].replace('/activity','').replace('/','#')
|
||||||
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')
|
||||||
|
|
Loading…
Reference in New Issue