forked from indymedia/epicyon
Reply to self
parent
fd8f2c569f
commit
5be718fc0f
|
@ -1809,24 +1809,27 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \
|
||||||
containerClassIcons='containericons darker'
|
containerClassIcons='containericons darker'
|
||||||
containerClass='container darker'
|
containerClass='container darker'
|
||||||
#avatarPosition=' class="right"'
|
#avatarPosition=' class="right"'
|
||||||
if '/statuses/' in postJsonObject['object']['inReplyTo']:
|
if postJsonObject['object']['inReplyTo'].startswith(postJsonObject['actor']):
|
||||||
replyNickname=getNicknameFromActor(postJsonObject['object']['inReplyTo'])
|
titleStr+=' <img src="/'+iconsDir+'/reply.png" class="announceOrReply"/>'
|
||||||
if replyNickname:
|
|
||||||
replyDomain,replyPort=getDomainFromActor(postJsonObject['object']['inReplyTo'])
|
|
||||||
if replyNickname and replyDomain:
|
|
||||||
replyDisplayName=getDisplayName(postJsonObject['object']['inReplyTo'],personCache)
|
|
||||||
if replyDisplayName:
|
|
||||||
titleStr+=' <img src="/'+iconsDir+'/reply.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['inReplyTo']+'">'+replyDisplayName+'</a>'
|
|
||||||
else:
|
|
||||||
titleStr+=' <img src="/'+iconsDir+'/reply.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['inReplyTo']+'">@'+replyNickname+'@'+replyDomain+'</a>'
|
|
||||||
else:
|
|
||||||
titleStr+=' <img src="/'+iconsDir+'/reply.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['inReplyTo']+'">@unknown</a>'
|
|
||||||
else:
|
else:
|
||||||
postDomain=postJsonObject['object']['inReplyTo'].replace('https://','').replace('http://','').replace('dat://','')
|
if '/statuses/' in postJsonObject['object']['inReplyTo']:
|
||||||
if '/' in postDomain:
|
replyNickname=getNicknameFromActor(postJsonObject['object']['inReplyTo'])
|
||||||
postDomain=postDomain.split('/',1)[0]
|
if replyNickname:
|
||||||
if postDomain:
|
replyDomain,replyPort=getDomainFromActor(postJsonObject['object']['inReplyTo'])
|
||||||
titleStr+=' <img src="/'+iconsDir+'/reply.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['inReplyTo']+'">'+postDomain+'</a>'
|
if replyNickname and replyDomain:
|
||||||
|
replyDisplayName=getDisplayName(postJsonObject['object']['inReplyTo'],personCache)
|
||||||
|
if replyDisplayName:
|
||||||
|
titleStr+=' <img src="/'+iconsDir+'/reply.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['inReplyTo']+'">'+replyDisplayName+'</a>'
|
||||||
|
else:
|
||||||
|
titleStr+=' <img src="/'+iconsDir+'/reply.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['inReplyTo']+'">@'+replyNickname+'@'+replyDomain+'</a>'
|
||||||
|
else:
|
||||||
|
titleStr+=' <img src="/'+iconsDir+'/reply.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['inReplyTo']+'">@unknown</a>'
|
||||||
|
else:
|
||||||
|
postDomain=postJsonObject['object']['inReplyTo'].replace('https://','').replace('http://','').replace('dat://','')
|
||||||
|
if '/' in postDomain:
|
||||||
|
postDomain=postDomain.split('/',1)[0]
|
||||||
|
if postDomain:
|
||||||
|
titleStr+=' <img src="/'+iconsDir+'/reply.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['inReplyTo']+'">'+postDomain+'</a>'
|
||||||
attachmentStr=''
|
attachmentStr=''
|
||||||
if postJsonObject['object'].get('attachment'):
|
if postJsonObject['object'].get('attachment'):
|
||||||
if isinstance(postJsonObject['object']['attachment'], list):
|
if isinstance(postJsonObject['object']['attachment'], list):
|
||||||
|
|
Loading…
Reference in New Issue