main
Bob Mottram 2019-12-01 19:00:28 +00:00
parent 546f25a274
commit 8265538c55
1 changed files with 10 additions and 10 deletions

View File

@ -2172,7 +2172,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
replyStr='' replyStr=''
if showIcons: if showIcons:
replyToLink=messageId replyToLink=postJsonObject['object']['id']
if postJsonObject['object'].get('attributedTo'): if postJsonObject['object'].get('attributedTo'):
replyToLink+='?mention='+postJsonObject['object']['attributedTo'] replyToLink+='?mention='+postJsonObject['object']['attributedTo']
if postJsonObject['object'].get('content'): if postJsonObject['object'].get('content'):
@ -2215,7 +2215,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
announceLink='unrepeat' announceLink='unrepeat'
announceTitle=translate['Undo the repeat'] announceTitle=translate['Undo the repeat']
announceStr= \ announceStr= \
'<a href="/users/'+nickname+'?'+announceLink+'='+messageId+pageNumberParam+ \ '<a href="/users/'+nickname+'?'+announceLink+'='+postJsonObject['object']['id']+pageNumberParam+ \
'?actor='+postJsonObject['actor']+ \ '?actor='+postJsonObject['actor']+ \
'?bm='+timelinePostBookmark+ \ '?bm='+timelinePostBookmark+ \
'?tl='+boxName+'" title="'+announceTitle+'">' '?tl='+boxName+'" title="'+announceTitle+'">'
@ -2250,7 +2250,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
bookmarkTitle=translate['Undo the bookmark'] bookmarkTitle=translate['Undo the bookmark']
bookmarkStr= \ bookmarkStr= \
'<a href="/users/' + nickname + '?' + \ '<a href="/users/' + nickname + '?' + \
bookmarkLink + '=' + messageId + pageNumberParam + \ bookmarkLink + '=' + postJsonObject['object']['id'] + pageNumberParam + \
'?actor='+postJsonObject['actor']+ \ '?actor='+postJsonObject['actor']+ \
'?bm='+timelinePostBookmark+ \ '?bm='+timelinePostBookmark+ \
'?tl='+boxName+'" title="'+bookmarkTitle+'">' '?tl='+boxName+'" title="'+bookmarkTitle+'">'
@ -2292,7 +2292,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
addEmojiToDisplayName(baseDir,httpPrefix, \ addEmojiToDisplayName(baseDir,httpPrefix, \
nickname,domain, \ nickname,domain, \
announceDisplayName,False) announceDisplayName,False)
titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+messageId+'">'+announceDisplayName+'</a>' titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['id']+'">'+announceDisplayName+'</a>'
# show avatar of person replied to # show avatar of person replied to
announceActor=postJsonObject['object']['attributedTo'] announceActor=postJsonObject['object']['attributedTo']
announceAvatarUrl=getPersonAvatarUrl(baseDir,announceActor,personCache) announceAvatarUrl=getPersonAvatarUrl(baseDir,announceActor,personCache)
@ -2304,11 +2304,11 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
'title="'+translate['Show options for this person']+ \ 'title="'+translate['Show options for this person']+ \
'" alt=" "'+avatarPosition+'/></a></div>' '" alt=" "'+avatarPosition+'/></a></div>'
else: else:
titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+messageId+'">@'+announceNickname+'@'+announceDomain+'</a>' titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['id']+'">@'+announceNickname+'@'+announceDomain+'</a>'
else: else:
titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+messageId+'">@unattributed</a>' titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['id']+'">@unattributed</a>'
else: else:
titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+messageId+'">@unattributed</a>' titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['id']+'">@unattributed</a>'
else: else:
if postJsonObject['object'].get('inReplyTo'): if postJsonObject['object'].get('inReplyTo'):
containerClassIcons='containericons darker' containerClassIcons='containericons darker'
@ -2380,7 +2380,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
if postJsonObject['object'].get('url'): if postJsonObject['object'].get('url'):
imagePostUrl=postJsonObject['object']['url'] imagePostUrl=postJsonObject['object']['url']
else: else:
imagePostUrl=messageId imagePostUrl=postJsonObject['object']['id']
if imageDescription: if imageDescription:
galleryStr+=' <a href="'+imagePostUrl+'" class="gallerytext"><div class="gallerytext">'+imageDescription+'</div></a>\n' galleryStr+=' <a href="'+imagePostUrl+'" class="gallerytext"><div class="gallerytext">'+imageDescription+'</div></a>\n'
else: else:
@ -2418,7 +2418,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
if postJsonObject['object'].get('url'): if postJsonObject['object'].get('url'):
videoPostUrl=postJsonObject['object']['url'] videoPostUrl=postJsonObject['object']['url']
else: else:
videoPostUrl=messageId videoPostUrl=postJsonObject['object']['id']
if imageDescription: if imageDescription:
galleryStr+=' <a href="'+videoPostUrl+'" class="gallerytext"><div class="gallerytext">'+imageDescription+'</div></a>\n' galleryStr+=' <a href="'+videoPostUrl+'" class="gallerytext"><div class="gallerytext">'+imageDescription+'</div></a>\n'
else: else:
@ -2455,7 +2455,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
if postJsonObject['object'].get('url'): if postJsonObject['object'].get('url'):
audioPostUrl=postJsonObject['object']['url'] audioPostUrl=postJsonObject['object']['url']
else: else:
audioPostUrl=messageId audioPostUrl=postJsonObject['object']['id']
if imageDescription: if imageDescription:
galleryStr+=' <a href="'+audioPostUrl+'" class="gallerytext"><div class="gallerytext">'+imageDescription+'</div></a>\n' galleryStr+=' <a href="'+audioPostUrl+'" class="gallerytext"><div class="gallerytext">'+imageDescription+'</div></a>\n'
else: else: