main
Bob Mottram 2020-05-18 15:00:47 +01:00
parent 3badf3ad57
commit 71915b8c94
2 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ def noOfBlogReplies(baseDir: str, httpPrefix: str, translate: {},
def getBlogReplies(baseDir: str, httpPrefix: str, translate: {},
nickname: str, domain: str, domainFull: str,
postId: str, depth=0) -> str:
"""Returns the number of replies on the post
"""Returns a string containing html blog posts
"""
if depth > 4:
return ''
@ -106,7 +106,7 @@ def getBlogReplies(baseDir: str, httpPrefix: str, translate: {},
for postBox in tryPostBox:
postFilename = baseDir + '/accounts/' + \
nickname + '@' + domain + '/' + postBox + '/' + \
postId.replace('/', '#')
postId.replace('/', '#') + '.json'
if os.path.isfile(postFilename):
postFilename = baseDir + '/accounts/' + \
nickname + '@' + domain + \

View File

@ -1295,7 +1295,7 @@ class PubServer(BaseHTTPRequestHandler):
if blogFilename and nickname:
postJsonObject = loadJson(blogFilename)
if isBlogPost(postJsonObject):
msg = htmlBlogPost(True,
msg = htmlBlogPost(authorized,
self.server.baseDir,
self.server.httpPrefix,
self.server.translate,