diff --git a/bookmarks.py b/bookmarks.py index 4963c02d9..e81dac450 100644 --- a/bookmarks.py +++ b/bookmarks.py @@ -258,14 +258,11 @@ def update_bookmarks_collection(recent_posts_cache: {}, def bookmark_post(recent_posts_cache: {}, - session, base_dir: str, federation_list: [], + base_dir: str, federation_list: [], nickname: str, domain: str, port: int, - ccList: [], http_prefix: str, - object_url: str, actorBookmarked: str, - client_to_server: bool, - send_threads: [], post_log: [], - person_cache: {}, cached_webfingers: {}, - debug: bool, project_version: str) -> {}: + cc_list: [], http_prefix: str, + object_url: str, actor_bookmarked: str, + debug: bool) -> {}: """Creates a bookmark actor is the person doing the bookmarking 'to' might be a specific person (actor) whose post was bookmarked @@ -282,14 +279,14 @@ def bookmark_post(recent_posts_cache: {}, 'actor': local_actor_url(http_prefix, nickname, full_domain), 'object': object_url } - if ccList: - if len(ccList) > 0: - new_bookmark_json['cc'] = ccList + if cc_list: + if len(cc_list) > 0: + new_bookmark_json['cc'] = cc_list # Extract the domain and nickname from a statuses link bookmarked_post_nickname = None - if actorBookmarked: - ac_bm = actorBookmarked + if actor_bookmarked: + ac_bm = actor_bookmarked bookmarked_post_nickname = get_nickname_from_actor(ac_bm) _, _ = get_domain_from_actor(ac_bm) else: @@ -315,14 +312,11 @@ def bookmark_post(recent_posts_cache: {}, def undo_bookmark_post(recent_posts_cache: {}, - session, base_dir: str, federation_list: [], + base_dir: str, federation_list: [], nickname: str, domain: str, port: int, - ccList: [], http_prefix: str, - object_url: str, actorBookmarked: str, - client_to_server: bool, - send_threads: [], post_log: [], - person_cache: {}, cached_webfingers: {}, - debug: bool, project_version: str) -> {}: + cc_list: [], http_prefix: str, + object_url: str, actor_bookmarked: str, + debug: bool) -> {}: """Removes a bookmark actor is the person doing the bookmarking 'to' might be a specific person (actor) whose post was bookmarked @@ -343,15 +337,15 @@ def undo_bookmark_post(recent_posts_cache: {}, 'object': object_url } } - if ccList: - if len(ccList) > 0: - new_undo_bookmark_json['cc'] = ccList - new_undo_bookmark_json['object']['cc'] = ccList + if cc_list: + if len(cc_list) > 0: + new_undo_bookmark_json['cc'] = cc_list + new_undo_bookmark_json['object']['cc'] = cc_list # Extract the domain and nickname from a statuses link bookmarked_post_nickname = None - if actorBookmarked: - ac_bm = actorBookmarked + if actor_bookmarked: + ac_bm = actor_bookmarked bookmarked_post_nickname = get_nickname_from_actor(ac_bm) _, _ = get_domain_from_actor(ac_bm) else: diff --git a/daemon.py b/daemon.py index 22132280e..c65adc9c6 100644 --- a/daemon.py +++ b/daemon.py @@ -9966,20 +9966,10 @@ class PubServer(BaseHTTPRequestHandler): local_actor_url(http_prefix, self.post_to_nickname, domain_full) cc_list = [] bookmark_post(self.server.recent_posts_cache, - curr_session, - base_dir, - self.server.federation_list, - self.post_to_nickname, - domain, port, - cc_list, - http_prefix, - bookmark_url, bookmark_actor, False, - self.server.send_threads, - self.server.postLog, - self.server.person_cache, - self.server.cached_webfingers, - self.server.debug, - self.server.project_version) + base_dir, self.server.federation_list, + self.post_to_nickname, domain, port, + cc_list, http_prefix, bookmark_url, bookmark_actor, + self.server.debug) # clear the icon from the cache so that it gets updated if self.server.iconsCache.get('bookmark.png'): del self.server.iconsCache['bookmark.png'] @@ -10122,20 +10112,10 @@ class PubServer(BaseHTTPRequestHandler): local_actor_url(http_prefix, self.post_to_nickname, domain_full) cc_list = [] undo_bookmark_post(self.server.recent_posts_cache, - curr_session, - base_dir, - self.server.federation_list, + base_dir, self.server.federation_list, self.post_to_nickname, - domain, port, - cc_list, - http_prefix, - bookmark_url, undo_actor, False, - self.server.send_threads, - self.server.postLog, - self.server.person_cache, - self.server.cached_webfingers, - debug, - self.server.project_version) + domain, port, cc_list, http_prefix, + bookmark_url, undo_actor, debug) # clear the icon from the cache so that it gets updated if self.server.iconsCache.get('bookmark_inactive.png'): del self.server.iconsCache['bookmark_inactive.png']