Creating bookmarks timeline

This commit is contained in:
bashrc committed 2020-05-21 20:58:21 +01:00
1 parent bd32159431
commit dca3da71b5
2 files changed
+7 -3

No files matched your search

+5 -1
View File
@@ -3825,7 +3825,9 @@ class PubServer(BaseHTTPRequestHandler):
# get the bookmarks for a given person
if self.path.endswith('/tlbookmarks') or \
'/tlbookmarks?page=' in self.path:
'/tlbookmarks?page=' in self.path or \
self.path.endswith('/bookmarks') or \
'/bookmarks?page=' in self.path:
if '/users/' in self.path:
if authorized:
bookmarksFeed = \
@@ -3842,6 +3844,7 @@ class PubServer(BaseHTTPRequestHandler):
if self._requestHTTP():
nickname = self.path.replace('/users/', '')
nickname = nickname.replace('/tlbookmarks', '')
nickname = nickname.replace('/bookmarks', '')
pageNumber = 1
if '?page=' in nickname:
pageNumber = nickname.split('?page=')[1]
@@ -3902,6 +3905,7 @@ class PubServer(BaseHTTPRequestHandler):
if self.server.debug:
nickname = self.path.replace('/users/', '')
nickname = nickname.replace('/tlbookmarks', '')
nickname = nickname.replace('/bookmarks', '')
print('DEBUG: ' + nickname +
' was not authorized to access ' + self.path)
if self.server.debug:
+2 -2
View File
@@ -546,7 +546,7 @@ def personBoxJson(recentPostsCache: {},
boxname != 'tlreplies' and boxname != 'tlmedia' and \
boxname != 'tlblogs' and \
boxname != 'outbox' and boxname != 'moderation' and \
boxname != 'tlbookmarks':
boxname != 'tlbookmarks' and boxname != 'bookmarks':
return None
if not '/' + boxname in path:
@@ -589,7 +589,7 @@ def personBoxJson(recentPostsCache: {},
return createDMTimeline(session, baseDir, nickname, domain, port,
httpPrefix,
noOfItems, headerOnly, ocapAlways, pageNumber)
elif boxname == 'tlbookmarks':
elif boxname == 'tlbookmarks' or boxname == 'bookmarks':
return createBookmarksTimeline(session, baseDir, nickname, domain,
port, httpPrefix,
noOfItems, headerOnly, ocapAlways,