Convert from news to nickname

main
Bob Mottram 2020-10-07 19:51:08 +01:00
parent 404912cd31
commit 7c9b9d4263
1 changed files with 4 additions and 0 deletions

View File

@ -6533,6 +6533,9 @@ class PubServer(BaseHTTPRequestHandler):
httpPrefix, httpPrefix,
maxPostsInBlogsFeed, 'tlnews', maxPostsInBlogsFeed, 'tlnews',
True) True)
currNickname = path.split('/users/')[1]
if '/' in currNickname:
currNickname = currNickname.split('/')[0]
msg = \ msg = \
htmlInboxBlogs(self.server.defaultTimeline, htmlInboxBlogs(self.server.defaultTimeline,
self.server.recentPostsCache, self.server.recentPostsCache,
@ -6553,6 +6556,7 @@ class PubServer(BaseHTTPRequestHandler):
self._isMinimal(nickname), self._isMinimal(nickname),
self.server.YTReplacementDomain, self.server.YTReplacementDomain,
self.server.newswire) self.server.newswire)
msg = msg.replace('/news/', '/' + currNickname + '/')
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
self._set_headers('text/html', len(msg), self._set_headers('text/html', len(msg),
cookie, callingDomain) cookie, callingDomain)