diff --git a/bookmarks.py b/bookmarks.py index d6f9817c0..e4a43d70d 100644 --- a/bookmarks.py +++ b/bookmarks.py @@ -204,10 +204,11 @@ def updateBookmarksCollection(recentPostsCache: {}, try: with open(bookmarksIndexFilename, 'r+') as bmIndexFile: content = bmIndexFile.read() - bmIndexFile.seek(0, 0) - bmIndexFile.write(bookmarkIndex + '\n' + content) - if debug: - print('DEBUG: bookmark added to index') + if bookmarkIndex + '\n' not in content: + bmIndexFile.seek(0, 0) + bmIndexFile.write(bookmarkIndex + '\n' + content) + if debug: + print('DEBUG: bookmark added to index') except Exception as e: print('WARN: Failed to write entry to bookmarks index ' + bookmarksIndexFilename + ' ' + str(e)) diff --git a/daemon.py b/daemon.py index b21e3322d..eefc8965b 100644 --- a/daemon.py +++ b/daemon.py @@ -87,6 +87,7 @@ from inbox import runInboxQueueWatchdog from inbox import savePostToInboxQueue from inbox import populateReplies from inbox import getPersonPubKey +from follow import isFollowingActor from follow import getFollowingFeed from follow import sendFollowRequest from follow import unfollowAccount @@ -116,6 +117,7 @@ from blog import htmlBlogView from blog import htmlBlogPage from blog import htmlBlogPost from blog import htmlEditBlog +from webapp_utils import getAvatarImageUrl from webapp_utils import htmlHashtagBlocked from webapp_utils import htmlFollowingList from webapp_utils import setBlogAddress @@ -663,7 +665,7 @@ class PubServer(BaseHTTPRequestHandler): 'text-align: center;">' + str(httpCode) + '' \ '
' + httpDescription + '
' \ '