CW functionality on individual posts

master
Bob Mottram 2019-08-02 21:21:25 +01:00
parent c8de658f77
commit 0c2d77da35
1 changed files with 6 additions and 2 deletions

View File

@ -579,7 +579,10 @@ def individualPostAsHtml(baseDir: str, \
timeClass='time-right' timeClass='time-right'
actorNickname=getNicknameFromActor(postJsonObject['actor']) actorNickname=getNicknameFromActor(postJsonObject['actor'])
actorDomain,actorPort=getDomainFromActor(postJsonObject['actor']) actorDomain,actorPort=getDomainFromActor(postJsonObject['actor'])
titleStr+='@'+actorNickname+'@'+actorDomain messageId=''
if postJsonObject.get('id'):
messageId=postJsonObject['id'].replace('/activity','')
titleStr+='<a href="'+messageId+'">@'+actorNickname+'@'+actorDomain+'</a>'
if postJsonObject['object']['inReplyTo']: if postJsonObject['object']['inReplyTo']:
containerClassIcons='containericons darker' containerClassIcons='containericons darker'
containerClass='container darker' containerClass='container darker'
@ -800,7 +803,8 @@ def htmlIndividualPost(baseDir: str,session,wfRequest: {},personCache: {}, \
postJsonObject: {}) -> str: postJsonObject: {}) -> str:
"""Show an individual post as html """Show an individual post as html
""" """
postStr= \ postStr='<script>'+contentWarningScript()+'</script>'
postStr+= \
individualPostAsHtml(baseDir,session,wfRequest,personCache, \ individualPostAsHtml(baseDir,session,wfRequest,personCache, \
nickname,domain,port,postJsonObject,None,True,False) nickname,domain,port,postJsonObject,None,True,False)
messageId=postJsonObject['id'].replace('/activity','') messageId=postJsonObject['id'].replace('/activity','')