From 585a1340e913b1dce2270e21e205bcd7efbea898 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 8 Oct 2020 11:32:59 +0100 Subject: [PATCH] No date link on news posts --- daemon.py | 1 - webinterface.py | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/daemon.py b/daemon.py index 37401417..278670d5 100644 --- a/daemon.py +++ b/daemon.py @@ -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) diff --git a/webinterface.py b/webinterface.py index 6ba8bd7f..bcb297be 100644 --- a/webinterface.py +++ b/webinterface.py @@ -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 = '' + publishedStr + '\n' + if not isNewsPost(postJsonObject): + footerStr = '' + publishedStr + '\n' + else: + footerStr = publishedStr + '\n' # change the background color for DMs in inbox timeline if showDMicon: