From c8ff37bd5b302d98d742341447036193248c6fc8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 31 May 2022 14:34:29 +0100 Subject: [PATCH] Tidying --- announce.py | 4 ++-- follow.py | 11 +++++------ inbox.py | 5 ++--- like.py | 3 +-- posts.py | 12 ++++-------- reaction.py | 3 +-- 6 files changed, 15 insertions(+), 23 deletions(-) diff --git a/announce.py b/announce.py index 626fb09ae..ef1dacac9 100644 --- a/announce.py +++ b/announce.py @@ -200,8 +200,8 @@ def create_announce(session, base_dir: str, federation_list: [], send_signed_json(new_announce, session, base_dir, nickname, domain, port, announce_nickname, announce_domain, - announce_port, None, - http_prefix, True, client_to_server, federation_list, + announce_port, + http_prefix, client_to_server, federation_list, send_threads, post_log, cached_webfingers, person_cache, debug, project_version, None, group_account, diff --git a/follow.py b/follow.py index 503377fac..154e17e1d 100644 --- a/follow.py +++ b/follow.py @@ -779,8 +779,8 @@ def followed_account_accepts(session, base_dir: str, http_prefix: str, return send_signed_json(accept_json, session, base_dir, nickname_to_follow, domain_to_follow, port, - nickname, domain, from_port, '', - http_prefix, True, client_to_server, + nickname, domain, from_port, + http_prefix, client_to_server, federation_list, send_threads, post_log, cached_webfingers, person_cache, debug, project_version, None, @@ -849,8 +849,8 @@ def followed_account_rejects(session, session_onion, session_i2p, # send the reject activity return send_signed_json(reject_json, session, base_dir, nickname_to_follow, domain_to_follow, port, - nickname, domain, from_port, '', - http_prefix, True, client_to_server, + nickname, domain, from_port, + http_prefix, client_to_server, federation_list, send_threads, post_log, cached_webfingers, person_cache, debug, project_version, None, @@ -947,8 +947,7 @@ def send_follow_request(session, base_dir: str, send_signed_json(new_follow_json, session, base_dir, nickname, sender_domain, sender_port, follow_nickname, follow_domain, follow_port, - 'https://www.w3.org/ns/activitystreams#Public', - http_prefix, True, client_to_server, + http_prefix, client_to_server, federation_list, send_threads, post_log, cached_webfingers, person_cache, debug, project_version, None, group_account, diff --git a/inbox.py b/inbox.py index 97c798e0b..8dfd4fb46 100644 --- a/inbox.py +++ b/inbox.py @@ -3256,7 +3256,6 @@ def _bounce_dm(senderPostId: str, session, http_prefix: str, if ':' in sender_domain: sender_port = get_port_from_domain(sender_domain) sender_domain = remove_domain_port(sender_domain) - cc_list = [] # create the bounce DM subject = None @@ -3299,8 +3298,8 @@ def _bounce_dm(senderPostId: str, session, http_prefix: str, print('Sending bounce DM to ' + sending_handle) send_signed_json(post_json_object, session, base_dir, nickname, domain, port, - sender_nickname, sender_domain, sender_port, cc_list, - http_prefix, False, False, federation_list, + sender_nickname, sender_domain, sender_port, + http_prefix, False, federation_list, send_threads, post_log, cached_webfingers, person_cache, debug, __version__, None, group_account, signing_priv_key_pem, 7238634, diff --git a/like.py b/like.py index 51a2b00cb..a4fbe7c3b 100644 --- a/like.py +++ b/like.py @@ -139,8 +139,7 @@ def _create_like(recent_posts_cache: {}, nickname, domain, port, liked_post_nickname, liked_post_domain, liked_post_port, - 'https://www.w3.org/ns/activitystreams#Public', - http_prefix, True, client_to_server, federation_list, + http_prefix, client_to_server, federation_list, send_threads, post_log, cached_webfingers, person_cache, debug, project_version, None, group_account, diff --git a/posts.py b/posts.py index ffe8fab8c..2a345ddc9 100644 --- a/posts.py +++ b/posts.py @@ -2761,8 +2761,7 @@ def _add_followers_to_public_post(post_json_object: {}) -> None: def send_signed_json(post_json_object: {}, session, base_dir: str, nickname: str, domain: str, port: int, to_nickname: str, to_domain: str, - to_port: int, cc_str: str, - http_prefix: str, save_to_file: bool, + to_port: int, http_prefix: str, client_to_server: bool, federation_list: [], send_threads: [], post_log: [], cached_webfingers: {}, person_cache: {}, debug: bool, project_version: str, @@ -3203,7 +3202,6 @@ def _send_to_named_addresses(server, session, session_onion, session_i2p, to_port = 80 curr_proxy_type = 'i2p' session_type = 'i2p' - cc_list = [] if debug: to_domain_full = get_full_domain(to_domain, to_port) @@ -3235,7 +3233,7 @@ def _send_to_named_addresses(server, session, session_onion, session_i2p, send_signed_json(post_json_object, curr_session, base_dir, nickname, from_domain, port, to_nickname, to_domain, to_port, - cc_list, from_http_prefix, True, client_to_server, + from_http_prefix, client_to_server, federation_list, send_threads, post_log, cached_webfingers, person_cache, debug, project_version, @@ -3437,8 +3435,6 @@ def send_to_followers(server, session, session_onion, session_i2p, to_port = get_port_from_domain(to_domain) to_domain = remove_domain_port(to_domain) - cc_list = '' - # if we are sending to an onion domain and we # have an alt onion domain then use the alt from_domain = domain @@ -3497,7 +3493,7 @@ def send_to_followers(server, session, session_onion, session_i2p, send_signed_json(post_json_object, curr_session, base_dir, nickname, from_domain, port, to_nickname, to_domain, to_port, - cc_list, from_http_prefix, True, + from_http_prefix, client_to_server, federation_list, send_threads, post_log, cached_webfingers, person_cache, debug, project_version, @@ -3530,7 +3526,7 @@ def send_to_followers(server, session, session_onion, session_i2p, send_signed_json(post_json_object, curr_session, base_dir, nickname, from_domain, port, to_nickname, to_domain, to_port, - cc_list, from_http_prefix, True, + from_http_prefix, client_to_server, federation_list, send_threads, post_log, cached_webfingers, person_cache, debug, project_version, diff --git a/reaction.py b/reaction.py index a610e198b..ef9f11627 100644 --- a/reaction.py +++ b/reaction.py @@ -138,8 +138,7 @@ def _reactionpost(recent_posts_cache: {}, nickname, domain, port, reaction_post_nickname, reaction_post_domain, reaction_post_port, - 'https://www.w3.org/ns/activitystreams#Public', - http_prefix, True, client_to_server, federation_list, + http_prefix, client_to_server, federation_list, send_threads, post_log, cached_webfingers, person_cache, debug, project_version, None, group_account,