Remove any hash from cached post id

main
Bob Mottram 2019-11-25 14:09:47 +00:00
parent 91058ea30f
commit d73f40c8f2
1 changed files with 4 additions and 1 deletions

View File

@ -449,7 +449,10 @@ def getCachedPostFilename(baseDir: str,nickname: str,domain: str, \
"""
cachedPostFilename= \
getCachedPostDirectory(baseDir,nickname,domain)+ \
'/'+postJsonObject['id'].replace('/activity','').replace('/','#')+'.html'
'/'+postJsonObject['id'].replace('/activity','')
if '#' in cachedPostFilename:
cachedPostFilename=cachedPostFilename.split('#',1)[0]
cachedPostFilename=cachedPostFilename.replace('/','#')+'.html'
return cachedPostFilename
def removePostFromCache(postJsonObject: {},recentPostsCache: {}):