mirror of https://gitlab.com/bashrc2/epicyon
Use messageId
parent
4aa5682708
commit
4852e53973
|
@ -2172,7 +2172,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
|
||||||
|
|
||||||
replyStr=''
|
replyStr=''
|
||||||
if showIcons:
|
if showIcons:
|
||||||
replyToLink=postJsonObject['object']['id']
|
replyToLink=messageId
|
||||||
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+'='+postJsonObject['object']['id']+pageNumberParam+ \
|
'<a href="/users/'+nickname+'?'+announceLink+'='+messageId+pageNumberParam+ \
|
||||||
'?actor='+postJsonObject['actor']+ \
|
'?actor='+postJsonObject['actor']+ \
|
||||||
'?bm='+timelinePostBookmark+ \
|
'?bm='+timelinePostBookmark+ \
|
||||||
'?tl='+boxName+'" title="'+announceTitle+'">'
|
'?tl='+boxName+'" title="'+announceTitle+'">'
|
||||||
|
@ -2233,7 +2233,7 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
|
||||||
likeTitle=translate['Undo the like']
|
likeTitle=translate['Undo the like']
|
||||||
likeStr= \
|
likeStr= \
|
||||||
'<a href="/users/' + nickname + '?' + \
|
'<a href="/users/' + nickname + '?' + \
|
||||||
likeLink + '=' + postJsonObject['object']['id'] + pageNumberParam + \
|
likeLink + '=' + messageId + pageNumberParam + \
|
||||||
'?actor='+postJsonObject['actor']+ \
|
'?actor='+postJsonObject['actor']+ \
|
||||||
'?bm='+timelinePostBookmark+ \
|
'?bm='+timelinePostBookmark+ \
|
||||||
'?tl='+boxName+'" title="'+likeTitle+'">'
|
'?tl='+boxName+'" title="'+likeTitle+'">'
|
||||||
|
@ -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 + '=' + postJsonObject['object']['id'] + pageNumberParam + \
|
bookmarkLink + '=' + messageId + pageNumberParam + \
|
||||||
'?actor='+postJsonObject['actor']+ \
|
'?actor='+postJsonObject['actor']+ \
|
||||||
'?bm='+timelinePostBookmark+ \
|
'?bm='+timelinePostBookmark+ \
|
||||||
'?tl='+boxName+'" title="'+bookmarkTitle+'">'
|
'?tl='+boxName+'" title="'+bookmarkTitle+'">'
|
||||||
|
@ -2262,16 +2262,16 @@ def individualPostAsHtml(recentPostsCache: {},maxRecentPosts: int, \
|
||||||
muteStr=''
|
muteStr=''
|
||||||
if allowDeletion or \
|
if allowDeletion or \
|
||||||
('/'+fullDomain+'/' in postActor and \
|
('/'+fullDomain+'/' in postActor and \
|
||||||
postJsonObject['object']['id'].startswith(postActor)):
|
messageId.startswith(postActor)):
|
||||||
if '/users/'+nickname+'/' in postJsonObject['object']['id']:
|
if '/users/'+nickname+'/' in messageId:
|
||||||
deleteStr='<a href="/users/'+nickname+'?delete='+postJsonObject['object']['id']+pageNumberParam+'" title="'+translate['Delete this post']+'">'
|
deleteStr='<a href="/users/'+nickname+'?delete='+messageId+pageNumberParam+'" title="'+translate['Delete this post']+'">'
|
||||||
deleteStr+='<img loading="lazy" alt="'+translate['Delete this post']+' |" title="'+translate['Delete this post']+' |" src="/'+iconsDir+'/delete.png"/></a>'
|
deleteStr+='<img loading="lazy" alt="'+translate['Delete this post']+' |" title="'+translate['Delete this post']+' |" src="/'+iconsDir+'/delete.png"/></a>'
|
||||||
else:
|
else:
|
||||||
if not isMuted:
|
if not isMuted:
|
||||||
muteStr='<a href="/users/'+nickname+'?mute='+postJsonObject['object']['id']+pageNumberParam+'?tl='+boxName+'?bm='+timelinePostBookmark+'" title="'+translate['Mute this post']+'">'
|
muteStr='<a href="/users/'+nickname+'?mute='+messageId+pageNumberParam+'?tl='+boxName+'?bm='+timelinePostBookmark+'" title="'+translate['Mute this post']+'">'
|
||||||
muteStr+='<img loading="lazy" alt="'+translate['Mute this post']+' |" title="'+translate['Mute this post']+' |" src="/'+iconsDir+'/mute.png"/></a>'
|
muteStr+='<img loading="lazy" alt="'+translate['Mute this post']+' |" title="'+translate['Mute this post']+' |" src="/'+iconsDir+'/mute.png"/></a>'
|
||||||
else:
|
else:
|
||||||
muteStr='<a href="/users/'+nickname+'?unmute='+postJsonObject['object']['id']+pageNumberParam+'?tl='+boxName+'?bm='+timelinePostBookmark+'" title="'+translate['Undo mute']+'">'
|
muteStr='<a href="/users/'+nickname+'?unmute='+messageId+pageNumberParam+'?tl='+boxName+'?bm='+timelinePostBookmark+'" title="'+translate['Undo mute']+'">'
|
||||||
muteStr+='<img loading="lazy" alt="'+translate['Undo mute']+' |" title="'+translate['Undo mute']+' |" src="/'+iconsDir+'/unmute.png"/></a>'
|
muteStr+='<img loading="lazy" alt="'+translate['Undo mute']+' |" title="'+translate['Undo mute']+' |" src="/'+iconsDir+'/unmute.png"/></a>'
|
||||||
|
|
||||||
replyAvatarImageInPost=''
|
replyAvatarImageInPost=''
|
||||||
|
@ -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="'+postJsonObject['object']['id']+'">'+announceDisplayName+'</a>'
|
titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+messageId+'">'+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="'+postJsonObject['object']['id']+'">@'+announceNickname+'@'+announceDomain+'</a>'
|
titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+messageId+'">@'+announceNickname+'@'+announceDomain+'</a>'
|
||||||
else:
|
else:
|
||||||
titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['id']+'">@unattributed</a>'
|
titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+messageId+'">@unattributed</a>'
|
||||||
else:
|
else:
|
||||||
titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+postJsonObject['object']['id']+'">@unattributed</a>'
|
titleStr+=' <img loading="lazy" title="'+translate['announces']+'" alt="'+translate['announces']+'" src="/'+iconsDir+'/repeat_inactive.png" class="announceOrReply"/> <a href="'+messageId+'">@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=postJsonObject['object']['id']
|
imagePostUrl=messageId
|
||||||
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=postJsonObject['object']['id']
|
videoPostUrl=messageId
|
||||||
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=postJsonObject['object']['id']
|
audioPostUrl=messageId
|
||||||
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:
|
||||||
|
|
Loading…
Reference in New Issue