From 5aca1d49993adc6b63bc5d655b2df4721e65cdd0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 24 Sep 2019 12:05:47 +0100 Subject: [PATCH] Display reply avatar --- webinterface.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/webinterface.py b/webinterface.py index a7c87c5d..ed1d4de2 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1789,6 +1789,7 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \ if showDMicon: titleStr=titleStr+' ' + replyAvatarImageInPost='' if showRepeatIcon: if isAnnounced: if postJsonObject['object'].get('attributedTo'): @@ -1820,6 +1821,15 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \ replyDisplayName=getDisplayName(postJsonObject['object']['inReplyTo'],personCache) if replyDisplayName: titleStr+=' '+replyDisplayName+'' + + replyActor=postJsonObject['object']['inReplyTo'].split('/statuses/')[0] + replyAvatarUrl=getPersonAvatarUrl(baseDir,replyActor,personCache) + if replyAvatarUrl: + replyAvatarImageInPost= \ + '
' \ + ' ' \ + ' Avatar' \ + '
' else: titleStr+=' @'+replyNickname+'@'+replyDomain+'' else: @@ -2042,7 +2052,7 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \ return \ '
\n'+ \ avatarImageInPost+ \ - '

'+titleStr+'

'+ \ + '

'+titleStr+replyAvatarImageInPost+'

'+ \ contentStr+footerStr+ \ '
\n'