mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
94c95bc1af
commit
682cbc7800
|
@ -485,7 +485,17 @@ def daemon_http_post(self) -> None:
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
curr_session,
|
curr_session,
|
||||||
proxy_type)
|
proxy_type, self.server.translate,
|
||||||
|
self.server.system_language,
|
||||||
|
self.server.signing_priv_key_pem,
|
||||||
|
self.server.block_federated,
|
||||||
|
self.server.federation_list,
|
||||||
|
self.server.send_threads,
|
||||||
|
self.server.postLog,
|
||||||
|
self.server.cached_webfingers,
|
||||||
|
self.server.person_cache,
|
||||||
|
self.server.project_version,
|
||||||
|
self.server.sites_unavailable)
|
||||||
self.server.postreq_busy = False
|
self.server.postreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -523,7 +533,8 @@ def daemon_http_post(self) -> None:
|
||||||
self.server.onion_domain,
|
self.server.onion_domain,
|
||||||
self.server.i2p_domain,
|
self.server.i2p_domain,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
curr_session, proxy_type)
|
curr_session, proxy_type,
|
||||||
|
self.server.person_cache)
|
||||||
self.server.postreq_busy = False
|
self.server.postreq_busy = False
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,8 @@ def unfollow_confirm(self, calling_domain: str, cookie: str,
|
||||||
domain: str, domain_full: str, port: int,
|
domain: str, domain_full: str, port: int,
|
||||||
onion_domain: str, i2p_domain: str,
|
onion_domain: str, i2p_domain: str,
|
||||||
debug: bool,
|
debug: bool,
|
||||||
curr_session, proxy_type: str) -> None:
|
curr_session, proxy_type: str,
|
||||||
|
person_cache: {}) -> None:
|
||||||
"""Confirm to unfollow
|
"""Confirm to unfollow
|
||||||
"""
|
"""
|
||||||
users_path = path.split('/unfollowconfirm')[0]
|
users_path = path.split('/unfollowconfirm')[0]
|
||||||
|
@ -116,7 +117,7 @@ def unfollow_confirm(self, calling_domain: str, cookie: str,
|
||||||
path_users_section = path.split('/users/')[1]
|
path_users_section = path.split('/users/')[1]
|
||||||
self.post_to_nickname = path_users_section.split('/')[0]
|
self.post_to_nickname = path_users_section.split('/')[0]
|
||||||
group_account = has_group_type(base_dir, following_actor,
|
group_account = has_group_type(base_dir, following_actor,
|
||||||
self.server.person_cache)
|
person_cache)
|
||||||
unfollow_account(base_dir, self.post_to_nickname,
|
unfollow_account(base_dir, self.post_to_nickname,
|
||||||
domain,
|
domain,
|
||||||
following_nickname, following_domain_full,
|
following_nickname, following_domain_full,
|
||||||
|
@ -138,7 +139,18 @@ def follow_confirm2(self, calling_domain: str, cookie: str,
|
||||||
domain: str, domain_full: str, port: int,
|
domain: str, domain_full: str, port: int,
|
||||||
onion_domain: str, i2p_domain: str,
|
onion_domain: str, i2p_domain: str,
|
||||||
debug: bool,
|
debug: bool,
|
||||||
curr_session, proxy_type: str) -> None:
|
curr_session, proxy_type: str,
|
||||||
|
translate: {},
|
||||||
|
system_language: str,
|
||||||
|
signing_priv_key_pem: str,
|
||||||
|
block_federated: [],
|
||||||
|
federation_list: [],
|
||||||
|
send_threads: [],
|
||||||
|
post_log: str,
|
||||||
|
cached_webfingers: {},
|
||||||
|
person_cache: {},
|
||||||
|
project_version: str,
|
||||||
|
sites_unavailable: []) -> None:
|
||||||
"""Confirm to follow
|
"""Confirm to follow
|
||||||
"""
|
"""
|
||||||
users_path = path.split('/followconfirm')[0]
|
users_path = path.split('/followconfirm')[0]
|
||||||
|
@ -190,16 +202,16 @@ def follow_confirm2(self, calling_domain: str, cookie: str,
|
||||||
following_actor = following_actor.split('&')[0]
|
following_actor = following_actor.split('&')[0]
|
||||||
if is_moderator(base_dir, follower_nickname):
|
if is_moderator(base_dir, follower_nickname):
|
||||||
msg = \
|
msg = \
|
||||||
html_account_info(self.server.translate,
|
html_account_info(translate,
|
||||||
base_dir, http_prefix,
|
base_dir, http_prefix,
|
||||||
follower_nickname,
|
follower_nickname,
|
||||||
domain,
|
domain,
|
||||||
following_actor,
|
following_actor,
|
||||||
debug,
|
debug,
|
||||||
self.server.system_language,
|
system_language,
|
||||||
self.server.signing_priv_key_pem,
|
signing_priv_key_pem,
|
||||||
users_path,
|
users_path,
|
||||||
self.server.block_federated)
|
block_federated)
|
||||||
if msg:
|
if msg:
|
||||||
msg = msg.encode('utf-8')
|
msg = msg.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
@ -239,7 +251,7 @@ def follow_confirm2(self, calling_domain: str, cookie: str,
|
||||||
else:
|
else:
|
||||||
print('Sending follow request from ' +
|
print('Sending follow request from ' +
|
||||||
follower_nickname + ' to ' + following_actor)
|
follower_nickname + ' to ' + following_actor)
|
||||||
if not self.server.signing_priv_key_pem:
|
if not signing_priv_key_pem:
|
||||||
print('Sending follow request with no signing key')
|
print('Sending follow request with no signing key')
|
||||||
|
|
||||||
curr_domain = domain
|
curr_domain = domain
|
||||||
|
@ -279,18 +291,18 @@ def follow_confirm2(self, calling_domain: str, cookie: str,
|
||||||
following_domain,
|
following_domain,
|
||||||
following_actor,
|
following_actor,
|
||||||
following_port, curr_http_prefix,
|
following_port, curr_http_prefix,
|
||||||
False, self.server.federation_list,
|
False, federation_list,
|
||||||
self.server.send_threads,
|
send_threads,
|
||||||
self.server.postLog,
|
post_log,
|
||||||
self.server.cached_webfingers,
|
cached_webfingers,
|
||||||
self.server.person_cache, debug,
|
person_cache, debug,
|
||||||
self.server.project_version,
|
project_version,
|
||||||
self.server.signing_priv_key_pem,
|
signing_priv_key_pem,
|
||||||
domain,
|
domain,
|
||||||
onion_domain,
|
onion_domain,
|
||||||
i2p_domain,
|
i2p_domain,
|
||||||
self.server.sites_unavailable,
|
sites_unavailable,
|
||||||
self.server.system_language)
|
system_language)
|
||||||
|
|
||||||
if '&submitUnblock=' in follow_confirm_params:
|
if '&submitUnblock=' in follow_confirm_params:
|
||||||
blocking_actor = \
|
blocking_actor = \
|
||||||
|
|
Loading…
Reference in New Issue