No date link on news posts

main
Bob Mottram 2020-10-08 11:32:59 +01:00
parent d1f252aed6
commit 585a1340e9
2 changed files with 5 additions and 6 deletions

View File

@ -6566,7 +6566,6 @@ class PubServer(BaseHTTPRequestHandler):
msg = msg.replace('/users/news?',
'/users/' + currNickname + '?')
msg = msg.replace('/banner.webp', '/banner.png')
msg = msg.replace('/news2/', '/news/')
msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg),
cookie, callingDomain)

View File

@ -5059,17 +5059,17 @@ def individualPostAsHtml(allowDownloads: bool,
# is this a post to the local domain?
if '://' + domain in messageId:
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
# on clearnet or onion address
if domain + '/users/' in publishedLink or \
domain + ':' + str(port) + '/users/' in publishedLink:
publishedLink = '/users/' + publishedLink.split('/users/')[1]
footerStr = '<a href="' + publishedLink + \
'" class="' + timeClass + '">' + publishedStr + '</a>\n'
if not isNewsPost(postJsonObject):
footerStr = '<a href="' + publishedLink + \
'" class="' + timeClass + '">' + publishedStr + '</a>\n'
else:
footerStr = publishedStr + '\n'
# change the background color for DMs in inbox timeline
if showDMicon: