diff --git a/utils.py b/utils.py index 44dce8ad0..50bd7f5ec 100644 --- a/utils.py +++ b/utils.py @@ -509,6 +509,7 @@ def updateRecentPostsCache(recentPostsCache: {},maxRecentPosts: int, \ if postId in recentPostsCache['index']: return recentPostsCache['index'].append(postId) + postJsonObject['muted']=False recentPostsCache['json'][postId]=json.dumps(postJsonObject) recentPostsCache['html'][postId]=htmlStr diff --git a/webinterface.py b/webinterface.py index 89ebd2b8b..d897fba38 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1998,8 +1998,9 @@ def preparePostFromHtmlCache(postHtml: str,boxName: str,pageNumber: int) -> str: def postIsMuted(baseDir: str,nickname: str,domain: str, postJsonObject: {},messageId: str) -> bool: """ Returns true if the given post is muted """ - if postJsonObject.get('muted'): - return True + isMuted=postJsonObject.get('muted') + if isMuted==True or isMuted==False: + return isMuted postDir=baseDir+'/accounts/'+nickname+'@'+domain muteFilename=postDir+'/inbox/'+messageId.replace('/','#')+'.json.muted' if os.path.isfile(muteFilename):