forked from indymedia/epicyon
Update avatar if needed
parent
ad92d8ee08
commit
f482f4edac
|
@ -1830,15 +1830,20 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \
|
||||||
storeToCache=True) -> str:
|
storeToCache=True) -> str:
|
||||||
""" Shows a single post as html
|
""" Shows a single post as html
|
||||||
"""
|
"""
|
||||||
|
postActor=postJsonObject['actor']
|
||||||
|
|
||||||
if not showPublicOnly and storeToCache and boxName!='tlmedia':
|
if not showPublicOnly and storeToCache and boxName!='tlmedia':
|
||||||
|
# update avatar if needed
|
||||||
|
if not avatarUrl:
|
||||||
|
avatarUrl=getPersonAvatarUrl(baseDir,postActor,personCache)
|
||||||
|
updateAvatarImageCache(session,baseDir,httpPrefix,postActor,avatarUrl,personCache)
|
||||||
|
|
||||||
postHtml= \
|
postHtml= \
|
||||||
loadIndividualPostAsHtmlFromCache(baseDir,nickname,domain, \
|
loadIndividualPostAsHtmlFromCache(baseDir,nickname,domain, \
|
||||||
postJsonObject)
|
postJsonObject)
|
||||||
if postHtml:
|
if postHtml:
|
||||||
return postHtml.replace(';-999;',';'+str(pageNumber)+';').replace('?page=-999','?page='+str(pageNumber))
|
return postHtml.replace(';-999;',';'+str(pageNumber)+';').replace('?page=-999','?page='+str(pageNumber))
|
||||||
|
|
||||||
postActor=postJsonObject['actor']
|
|
||||||
|
|
||||||
# If this is the inbox timeline then don't show the repeat icon on any DMs
|
# If this is the inbox timeline then don't show the repeat icon on any DMs
|
||||||
showRepeatIcon=showRepeats
|
showRepeatIcon=showRepeats
|
||||||
showDMicon=False
|
showDMicon=False
|
||||||
|
|
Loading…
Reference in New Issue