forked from indymedia/epicyon
CW functionality on individual posts
parent
c8de658f77
commit
0c2d77da35
|
@ -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','')
|
||||||
|
|
Loading…
Reference in New Issue