diff --git a/bookmarks.py b/bookmarks.py index f700662b..dfc5ae18 100644 --- a/bookmarks.py +++ b/bookmarks.py @@ -16,7 +16,6 @@ from utils import locatePost from utils import getCachedPostFilename from utils import loadJson from utils import saveJson -from posts import sendSignedJson from session import postJson from webfinger import webfingerHandle from auth import createBasicAuthHeader @@ -283,15 +282,6 @@ def bookmark(recentPostsCache: {}, updateBookmarksCollection(recentPostsCache, baseDir, postFilename, objectUrl, newBookmarkJson['actor'], domain, debug) - - #sendSignedJson(newBookmarkJson, session, baseDir, - # nickname, domain, port, - # bookmarkedPostNickname, - # bookmarkedPostDomain, bookmarkedPostPort, - # 'https://www.w3.org/ns/activitystreams#Public', - # httpPrefix, True, clientToServer, federationList, - # sendThreads, postLog, cachedWebfingers, personCache, - # debug, projectVersion) return newBookmarkJson @@ -389,15 +379,6 @@ def undoBookmark(recentPostsCache: {}, baseDir, postFilename, objectUrl, newUndoBookmarkJson['actor'], domain, debug) - - #sendSignedJson(newUndoBookmarkJson, session, baseDir, - # nickname, domain, port, - # bookmarkedPostNickname, bookmarkedPostDomain, - # bookmarkedPostPort, - # 'https://www.w3.org/ns/activitystreams#Public', - # httpPrefix, True, clientToServer, federationList, - # sendThreads, postLog, cachedWebfingers, personCache, - # debug, projectVersion) else: return None diff --git a/posts.py b/posts.py index 43d67ff2..cc2dfee4 100644 --- a/posts.py +++ b/posts.py @@ -2504,16 +2504,15 @@ def createBoxIndexed(recentPostsCache: {}, # bookmarks timeline is like the inbox but has its own separate index indexBoxName = boxname - if boxname == 'tlbookmarks': - indexBoxName = 'bookmarks' - elif boxname == 'dm': - indexBoxName = 'dm' - elif boxname == 'tlreplies': - indexBoxName = 'tlreplies' - elif boxname == 'tlmedia': - indexBoxName = 'tlmedia' - elif boxname == 'tlblogs': - indexBoxName = 'tlblogs' + boxes = { + "tlbookmarks": "bookmarks", + "dm": "dm", + "tlreplies": "tlreplies", + "tlmedia": "tlmedia", + "tlblogs": "tlblogs" + } + if boxes.get(boxname): + indexBoxName = boxes[boxname] if port: if port != 80 and port != 443: