Published link

main
Bob Mottram 2020-10-08 11:28:14 +01:00
parent 52626eb564
commit d1f252aed6
1 changed files with 4 additions and 4 deletions

View File

@ -5053,15 +5053,15 @@ def individualPostAsHtml(allowDownloads: bool,
if timeDiff > 100: if timeDiff > 100:
print('TIMING INDIV ' + boxName + ' 15 = ' + str(timeDiff)) print('TIMING INDIV ' + boxName + ' 15 = ' + str(timeDiff))
if '/users/news/' not in messageId: publishedLink = messageId
publishedLink = messageId
else:
publishedLink = messageId.replace('/users/news/', '/users/news2/')
# blog posts should have no /statuses/ in their link # blog posts should have no /statuses/ in their link
if isBlogPost(postJsonObject): if isBlogPost(postJsonObject):
# is this a post to the local domain? # is this a post to the local domain?
if '://' + domain in messageId: if '://' + domain in messageId:
publishedLink = messageId.replace('/statuses/', '/') publishedLink = messageId.replace('/statuses/', '/')
# this retains the news account reference for news posts
if '/users/news/' in publishedLink:
publishedLink = publishedLink.replace('/users/news/', '/users/news2/')
# if this is a local link then make it relative so that it works # if this is a local link then make it relative so that it works
# on clearnet or onion address # on clearnet or onion address
if domain + '/users/' in publishedLink or \ if domain + '/users/' in publishedLink or \