Post cache path

main
Bob Mottram 2020-03-01 20:03:19 +00:00
parent b0f514d329
commit 9e429b495d
1 changed files with 3 additions and 1 deletions

View File

@ -3927,7 +3927,8 @@ class PubServer(BaseHTTPRequestHandler):
postJsonObject=loadJson(postFilename)
if postJsonObject:
cachedFilename= \
self.server.baseDir+'/postcache/'+ \
self.server.baseDir+'/accounts/'+ \
nickname+'@'+self.server.domain+'/postcache/'+ \
fields['postUrl'].replace('/','#')+'.html'
if os.path.isfile(cachedFilename):
print('Edited blog post, removing cached html')
@ -3936,6 +3937,7 @@ class PubServer(BaseHTTPRequestHandler):
except:
pass
postJsonObject['object']['summary']=fields['subject']
# TODO format message
postJsonObject['object']['content']=fields['message']
saveJson(postJsonObject,postFilename)
print('Edited blog post, resaved '+postFilename)