mirror of https://gitlab.com/bashrc2/epicyon
Single events timeline name
parent
309cc6111c
commit
08ff5b420c
|
@ -4831,6 +4831,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'/events?page=' in self.path:
|
'/events?page=' in self.path:
|
||||||
if '/users/' in self.path:
|
if '/users/' in self.path:
|
||||||
if authorized:
|
if authorized:
|
||||||
|
if self.path.endswith('/events') or \
|
||||||
|
'/events?page=' in self.path:
|
||||||
|
self.path = self.path.replace('/events', '/tlevents')
|
||||||
eventsFeed = \
|
eventsFeed = \
|
||||||
personBoxJson(self.server.recentPostsCache,
|
personBoxJson(self.server.recentPostsCache,
|
||||||
self.server.session,
|
self.server.session,
|
||||||
|
@ -4845,7 +4848,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if self._requestHTTP():
|
if self._requestHTTP():
|
||||||
nickname = self.path.replace('/users/', '')
|
nickname = self.path.replace('/users/', '')
|
||||||
nickname = nickname.replace('/tlevents', '')
|
nickname = nickname.replace('/tlevents', '')
|
||||||
nickname = nickname.replace('/events', '')
|
|
||||||
pageNumber = 1
|
pageNumber = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
pageNumber = nickname.split('?page=')[1]
|
pageNumber = nickname.split('?page=')[1]
|
||||||
|
@ -4908,7 +4910,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
nickname = self.path.replace('/users/', '')
|
nickname = self.path.replace('/users/', '')
|
||||||
nickname = nickname.replace('/tlevents', '')
|
nickname = nickname.replace('/tlevents', '')
|
||||||
nickname = nickname.replace('/events', '')
|
|
||||||
print('DEBUG: ' + nickname +
|
print('DEBUG: ' + nickname +
|
||||||
' was not authorized to access ' + self.path)
|
' was not authorized to access ' + self.path)
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
|
|
|
@ -600,7 +600,7 @@ def personBoxJson(recentPostsCache: {},
|
||||||
boxname != 'tlblogs' and \
|
boxname != 'tlblogs' and \
|
||||||
boxname != 'outbox' and boxname != 'moderation' and \
|
boxname != 'outbox' and boxname != 'moderation' and \
|
||||||
boxname != 'tlbookmarks' and boxname != 'bookmarks' and \
|
boxname != 'tlbookmarks' and boxname != 'bookmarks' and \
|
||||||
boxname != 'tlevents' and boxname != 'events':
|
boxname != 'tlevents':
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if not '/' + boxname in path:
|
if not '/' + boxname in path:
|
||||||
|
@ -648,7 +648,7 @@ def personBoxJson(recentPostsCache: {},
|
||||||
port, httpPrefix,
|
port, httpPrefix,
|
||||||
noOfItems, headerOnly, ocapAlways,
|
noOfItems, headerOnly, ocapAlways,
|
||||||
pageNumber)
|
pageNumber)
|
||||||
elif boxname == 'tlevents' or boxname == 'events':
|
elif boxname == 'tlevents':
|
||||||
return createEventsTimeline(session, baseDir, nickname, domain,
|
return createEventsTimeline(session, baseDir, nickname, domain,
|
||||||
port, httpPrefix,
|
port, httpPrefix,
|
||||||
noOfItems, headerOnly, ocapAlways,
|
noOfItems, headerOnly, ocapAlways,
|
||||||
|
|
5
posts.py
5
posts.py
|
@ -2832,7 +2832,7 @@ def createBoxIndexed(recentPostsCache: {},
|
||||||
boxname != 'tlblogs' and \
|
boxname != 'tlblogs' and \
|
||||||
boxname != 'outbox' and boxname != 'tlbookmarks' and \
|
boxname != 'outbox' and boxname != 'tlbookmarks' and \
|
||||||
boxname != 'bookmarks' and \
|
boxname != 'bookmarks' and \
|
||||||
boxname != 'tlevents' and boxname != 'events':
|
boxname != 'tlevents':
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# bookmarks and events timelines are like the inbox
|
# bookmarks and events timelines are like the inbox
|
||||||
|
@ -2841,9 +2841,6 @@ def createBoxIndexed(recentPostsCache: {},
|
||||||
if boxname == "tlbookmarks":
|
if boxname == "tlbookmarks":
|
||||||
boxname = "bookmarks"
|
boxname = "bookmarks"
|
||||||
indexBoxName = boxname
|
indexBoxName = boxname
|
||||||
elif boxname == "tlevents":
|
|
||||||
boxname = "events"
|
|
||||||
indexBoxName = boxname
|
|
||||||
|
|
||||||
if port:
|
if port:
|
||||||
if port != 80 and port != 443:
|
if port != 80 and port != 443:
|
||||||
|
|
Loading…
Reference in New Issue