Single events timeline name

main
Bob Mottram 2020-08-26 10:29:51 +01:00
parent 309cc6111c
commit 08ff5b420c
3 changed files with 6 additions and 8 deletions

View File

@ -4831,6 +4831,9 @@ class PubServer(BaseHTTPRequestHandler):
'/events?page=' in self.path:
if '/users/' in self.path:
if authorized:
if self.path.endswith('/events') or \
'/events?page=' in self.path:
self.path = self.path.replace('/events', '/tlevents')
eventsFeed = \
personBoxJson(self.server.recentPostsCache,
self.server.session,
@ -4845,7 +4848,6 @@ class PubServer(BaseHTTPRequestHandler):
if self._requestHTTP():
nickname = self.path.replace('/users/', '')
nickname = nickname.replace('/tlevents', '')
nickname = nickname.replace('/events', '')
pageNumber = 1
if '?page=' in nickname:
pageNumber = nickname.split('?page=')[1]
@ -4908,7 +4910,6 @@ class PubServer(BaseHTTPRequestHandler):
if self.server.debug:
nickname = self.path.replace('/users/', '')
nickname = nickname.replace('/tlevents', '')
nickname = nickname.replace('/events', '')
print('DEBUG: ' + nickname +
' was not authorized to access ' + self.path)
if self.server.debug:

View File

@ -600,7 +600,7 @@ def personBoxJson(recentPostsCache: {},
boxname != 'tlblogs' and \
boxname != 'outbox' and boxname != 'moderation' and \
boxname != 'tlbookmarks' and boxname != 'bookmarks' and \
boxname != 'tlevents' and boxname != 'events':
boxname != 'tlevents':
return None
if not '/' + boxname in path:
@ -648,7 +648,7 @@ def personBoxJson(recentPostsCache: {},
port, httpPrefix,
noOfItems, headerOnly, ocapAlways,
pageNumber)
elif boxname == 'tlevents' or boxname == 'events':
elif boxname == 'tlevents':
return createEventsTimeline(session, baseDir, nickname, domain,
port, httpPrefix,
noOfItems, headerOnly, ocapAlways,

View File

@ -2832,7 +2832,7 @@ def createBoxIndexed(recentPostsCache: {},
boxname != 'tlblogs' and \
boxname != 'outbox' and boxname != 'tlbookmarks' and \
boxname != 'bookmarks' and \
boxname != 'tlevents' and boxname != 'events':
boxname != 'tlevents':
return None
# bookmarks and events timelines are like the inbox
@ -2841,9 +2841,6 @@ def createBoxIndexed(recentPostsCache: {},
if boxname == "tlbookmarks":
boxname = "bookmarks"
indexBoxName = boxname
elif boxname == "tlevents":
boxname = "events"
indexBoxName = boxname
if port:
if port != 80 and port != 443: