diff --git a/webinterface.py b/webinterface.py index 08d5cc22..2657b183 100644 --- a/webinterface.py +++ b/webinterface.py @@ -46,10 +46,19 @@ def individualPostAsHtml(postJsonObject: {}) -> str: avatarPosition='' containerClass='container' timeClass='time-right' + nickname=getNicknameFromActor(postJsonObject['actor']) + domain,port=getDomainFromActor(postJsonObject['actor']) + titleStr='@'+nickname+'@'+domain if postJsonObject['object']['inReplyTo']: containerClass='container darker' avatarPosition=' class="right"' timeClass='time-left' + if '/statuses/' in postJsonObject['object']['inReplyTo']: + replyNickname=getNicknameFromActor(postJsonObject['object']['inReplyTo']) + replyDomain,replyPort=getDomainFromActor(postJsonObject['object']['inReplyTo']) + titleStr+=' replying to @'+replyNickname+'@'+replyDomain+'' + else: + titleStr+=' replying to '+postJsonObject['object']['inReplyTo'] attachmentStr='' if postJsonObject['object']['attachment']: if isinstance(postJsonObject['object']['attachment'], list): @@ -73,14 +82,12 @@ def individualPostAsHtml(postJsonObject: {}) -> str: '' \ ''+imageDescription+'\n' attachmentCtr+=1 - - nickname=getNicknameFromActor(postJsonObject['actor']) - domain,port=getDomainFromActor(postJsonObject['actor']) + return \ '
\n' \ '' \ 'Avatar\n'+ \ - '

@'+nickname+'@'+domain+'

'+ \ + '

'+titleStr+'

'+ \ postJsonObject['object']['content']+'\n'+ \ attachmentStr+ \ ''+postJsonObject['object']['published']+'\n'+ \