From 0fde692c247a2ca91af3898454e5012bb52cffa4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 9 Jun 2022 11:28:03 +0100 Subject: [PATCH] Tidying --- acceptreject.py | 14 ++++---------- inbox.py | 6 +----- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/acceptreject.py b/acceptreject.py index 2b7a7021f..47e0a65dc 100644 --- a/acceptreject.py +++ b/acceptreject.py @@ -75,7 +75,7 @@ def create_reject(base_dir: str, federation_list: [], http_prefix, object_json, 'Reject') -def _accept_follow(base_dir: str, domain: str, message_json: {}, +def _accept_follow(base_dir: str, message_json: {}, federation_list: [], debug: bool, curr_domain: str, onion_domain: str, i2p_domain: str) -> None: @@ -195,14 +195,8 @@ def _accept_follow(base_dir: str, domain: str, message_json: {}, followed_nickname + '@' + followed_domain) -def receive_accept_reject(session, base_dir: str, - http_prefix: str, domain: str, port: int, - send_threads: [], post_log: [], - cached_webfingers: {}, - person_cache: {}, message_json: {}, - federation_list: [], - debug: bool, - curr_domain: str, +def receive_accept_reject(base_dir: str, domain: str, message_json: {}, + federation_list: [], debug: bool, curr_domain: str, onion_domain: str, i2p_domain: str) -> bool: """Receives an Accept or Reject within the POST section of HTTPServer """ @@ -229,7 +223,7 @@ def receive_accept_reject(session, base_dir: str, ' does not contain a nickname. ' + 'Assuming single user instance.') # receive follow accept - _accept_follow(base_dir, domain, message_json, federation_list, debug, + _accept_follow(base_dir, message_json, federation_list, debug, curr_domain, onion_domain, i2p_domain) if debug: print('DEBUG: Uh, ' + message_json['type'] + ', I guess') diff --git a/inbox.py b/inbox.py index 1ed30a05f..0d6c27acf 100644 --- a/inbox.py +++ b/inbox.py @@ -5302,11 +5302,7 @@ def run_inbox_queue(server, if debug: print('DEBUG: No follow requests') - if receive_accept_reject(curr_session, - base_dir, http_prefix, domain, port, - send_threads, post_log, - cached_webfingers, person_cache, - queue_json['post'], + if receive_accept_reject(base_dir, domain, queue_json['post'], federation_list, debug, domain, onion_domain, i2p_domain): print('Queue: Accept/Reject received from ' + key_id)