mirror of https://gitlab.com/bashrc2/epicyon
Creating bookmarks timeline
parent
bd32159431
commit
dca3da71b5
|
@ -3825,7 +3825,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
|
|
||||||
# get the bookmarks for a given person
|
# get the bookmarks for a given person
|
||||||
if self.path.endswith('/tlbookmarks') or \
|
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 '/users/' in self.path:
|
||||||
if authorized:
|
if authorized:
|
||||||
bookmarksFeed = \
|
bookmarksFeed = \
|
||||||
|
@ -3842,6 +3844,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if self._requestHTTP():
|
if self._requestHTTP():
|
||||||
nickname = self.path.replace('/users/', '')
|
nickname = self.path.replace('/users/', '')
|
||||||
nickname = nickname.replace('/tlbookmarks', '')
|
nickname = nickname.replace('/tlbookmarks', '')
|
||||||
|
nickname = nickname.replace('/bookmarks', '')
|
||||||
pageNumber = 1
|
pageNumber = 1
|
||||||
if '?page=' in nickname:
|
if '?page=' in nickname:
|
||||||
pageNumber = nickname.split('?page=')[1]
|
pageNumber = nickname.split('?page=')[1]
|
||||||
|
@ -3902,6 +3905,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if self.server.debug:
|
if self.server.debug:
|
||||||
nickname = self.path.replace('/users/', '')
|
nickname = self.path.replace('/users/', '')
|
||||||
nickname = nickname.replace('/tlbookmarks', '')
|
nickname = nickname.replace('/tlbookmarks', '')
|
||||||
|
nickname = nickname.replace('/bookmarks', '')
|
||||||
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:
|
||||||
|
|
|
@ -546,7 +546,7 @@ def personBoxJson(recentPostsCache: {},
|
||||||
boxname != 'tlreplies' and boxname != 'tlmedia' and \
|
boxname != 'tlreplies' and boxname != 'tlmedia' and \
|
||||||
boxname != 'tlblogs' and \
|
boxname != 'tlblogs' and \
|
||||||
boxname != 'outbox' and boxname != 'moderation' and \
|
boxname != 'outbox' and boxname != 'moderation' and \
|
||||||
boxname != 'tlbookmarks':
|
boxname != 'tlbookmarks' and boxname != 'bookmarks':
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if not '/' + boxname in path:
|
if not '/' + boxname in path:
|
||||||
|
@ -589,7 +589,7 @@ def personBoxJson(recentPostsCache: {},
|
||||||
return createDMTimeline(session, baseDir, nickname, domain, port,
|
return createDMTimeline(session, baseDir, nickname, domain, port,
|
||||||
httpPrefix,
|
httpPrefix,
|
||||||
noOfItems, headerOnly, ocapAlways, pageNumber)
|
noOfItems, headerOnly, ocapAlways, pageNumber)
|
||||||
elif boxname == 'tlbookmarks':
|
elif boxname == 'tlbookmarks' or boxname == 'bookmarks':
|
||||||
return createBookmarksTimeline(session, baseDir, nickname, domain,
|
return createBookmarksTimeline(session, baseDir, nickname, domain,
|
||||||
port, httpPrefix,
|
port, httpPrefix,
|
||||||
noOfItems, headerOnly, ocapAlways,
|
noOfItems, headerOnly, ocapAlways,
|
||||||
|
|
Loading…
Reference in New Issue