mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
8fb02acff4
commit
829299f27f
|
@ -3225,7 +3225,32 @@ def daemon_http_get(self) -> None:
|
|||
repeat_private,
|
||||
self.server.debug,
|
||||
curr_session,
|
||||
self.server.sites_unavailable)
|
||||
self.server.sites_unavailable,
|
||||
self.server.federation_list,
|
||||
self.server.send_threads,
|
||||
self.server.postLog,
|
||||
self.server.person_cache,
|
||||
self.server.cached_webfingers,
|
||||
self.server.project_version,
|
||||
self.server.signing_priv_key_pem,
|
||||
self.server.system_language,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
self.server.allow_deletion,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitter_replacement_domain,
|
||||
self.server.show_published_date_only,
|
||||
self.server.peertube_instances,
|
||||
self.server.allow_local_network_access,
|
||||
self.server.theme_name,
|
||||
self.server.max_like_count,
|
||||
self.server.cw_lists,
|
||||
self.server.lists_enabled,
|
||||
self.server.dogwhistles,
|
||||
self.server.buy_sites,
|
||||
self.server.auto_cw_cache,
|
||||
self.server.fitness)
|
||||
self.server.getreq_busy = False
|
||||
return
|
||||
|
||||
|
|
|
@ -55,7 +55,32 @@ def announce_button(self, calling_domain: str, path: str,
|
|||
getreq_start_time,
|
||||
repeat_private: bool,
|
||||
debug: bool,
|
||||
curr_session, sites_unavailable: []) -> None:
|
||||
curr_session, sites_unavailable: [],
|
||||
federation_list: [],
|
||||
send_threads: {},
|
||||
post_log: {},
|
||||
person_cache: {},
|
||||
cached_webfingers: {},
|
||||
project_version: str,
|
||||
signing_priv_key_pem: str,
|
||||
system_language: str,
|
||||
recent_posts_cache: {},
|
||||
max_recent_posts: int,
|
||||
translate: {},
|
||||
allow_deletion: bool,
|
||||
yt_replace_domain: str,
|
||||
twitter_replacement_domain: str,
|
||||
show_published_date_only: bool,
|
||||
peertube_instances: [],
|
||||
allow_local_network_access: bool,
|
||||
theme_name: str,
|
||||
max_like_count: int,
|
||||
cw_lists: {},
|
||||
lists_enabled: {},
|
||||
dogwhistles: {},
|
||||
buy_sites: [],
|
||||
auto_cw_cache: {},
|
||||
fitness: {}) -> None:
|
||||
"""The announce/repeat button was pressed on a post
|
||||
"""
|
||||
page_number = 1
|
||||
|
@ -137,23 +162,23 @@ def announce_button(self, calling_domain: str, path: str,
|
|||
announce_json = \
|
||||
create_announce(curr_session,
|
||||
base_dir,
|
||||
self.server.federation_list,
|
||||
federation_list,
|
||||
self.post_to_nickname,
|
||||
domain, port,
|
||||
announce_to_str,
|
||||
None, http_prefix,
|
||||
repeat_url, False, False,
|
||||
self.server.send_threads,
|
||||
self.server.postLog,
|
||||
self.server.person_cache,
|
||||
self.server.cached_webfingers,
|
||||
send_threads,
|
||||
post_log,
|
||||
person_cache,
|
||||
cached_webfingers,
|
||||
debug,
|
||||
self.server.project_version,
|
||||
self.server.signing_priv_key_pem,
|
||||
project_version,
|
||||
signing_priv_key_pem,
|
||||
domain,
|
||||
onion_domain,
|
||||
i2p_domain, sites_unavailable,
|
||||
self.server.system_language)
|
||||
system_language)
|
||||
announce_filename = None
|
||||
if announce_json:
|
||||
# save the announce straight to the outbox
|
||||
|
@ -171,11 +196,11 @@ def announce_button(self, calling_domain: str, path: str,
|
|||
|
||||
# send out the announce within a separate thread
|
||||
post_to_outbox(self, announce_json,
|
||||
self.server.project_version,
|
||||
project_version,
|
||||
self.post_to_nickname,
|
||||
curr_session, proxy_type)
|
||||
|
||||
fitness_performance(getreq_start_time, self.server.fitness,
|
||||
fitness_performance(getreq_start_time, fitness,
|
||||
'_GET', '_announce_button postToOutboxThread',
|
||||
debug)
|
||||
|
||||
|
@ -210,39 +235,40 @@ def announce_button(self, calling_domain: str, path: str,
|
|||
minimize_all_images = False
|
||||
if self.post_to_nickname in self.server.min_images_for_accounts:
|
||||
minimize_all_images = True
|
||||
individual_post_as_html(self.server.signing_priv_key_pem, False,
|
||||
self.server.recent_posts_cache,
|
||||
self.server.max_recent_posts,
|
||||
self.server.translate,
|
||||
individual_post_as_html(signing_priv_key_pem, False,
|
||||
recent_posts_cache,
|
||||
max_recent_posts,
|
||||
translate,
|
||||
page_number, base_dir,
|
||||
curr_session,
|
||||
self.server.cached_webfingers,
|
||||
self.server.person_cache,
|
||||
cached_webfingers,
|
||||
person_cache,
|
||||
self.post_to_nickname, domain,
|
||||
port, announce_json,
|
||||
None, True,
|
||||
self.server.allow_deletion,
|
||||
http_prefix, self.server.project_version,
|
||||
allow_deletion,
|
||||
http_prefix,
|
||||
project_version,
|
||||
timeline_str,
|
||||
self.server.yt_replace_domain,
|
||||
self.server.twitter_replacement_domain,
|
||||
self.server.show_published_date_only,
|
||||
self.server.peertube_instances,
|
||||
self.server.allow_local_network_access,
|
||||
self.server.theme_name,
|
||||
self.server.system_language,
|
||||
self.server.max_like_count,
|
||||
yt_replace_domain,
|
||||
twitter_replacement_domain,
|
||||
show_published_date_only,
|
||||
peertube_instances,
|
||||
allow_local_network_access,
|
||||
theme_name,
|
||||
system_language,
|
||||
max_like_count,
|
||||
show_repeats,
|
||||
show_individual_post_icons,
|
||||
manually_approve_followers,
|
||||
False, True, False,
|
||||
self.server.cw_lists,
|
||||
self.server.lists_enabled,
|
||||
cw_lists,
|
||||
lists_enabled,
|
||||
timezone, mitm, bold_reading,
|
||||
self.server.dogwhistles,
|
||||
dogwhistles,
|
||||
minimize_all_images, None,
|
||||
self.server.buy_sites,
|
||||
self.server.auto_cw_cache)
|
||||
buy_sites,
|
||||
auto_cw_cache)
|
||||
|
||||
actor_absolute = \
|
||||
get_instance_url(calling_domain,
|
||||
|
@ -255,7 +281,7 @@ def announce_button(self, calling_domain: str, path: str,
|
|||
actor_path_str = \
|
||||
actor_absolute + '/' + timeline_str + '?page=' + \
|
||||
str(page_number) + first_post_id + timeline_bookmark
|
||||
fitness_performance(getreq_start_time, self.server.fitness,
|
||||
fitness_performance(getreq_start_time, fitness,
|
||||
'_GET', '_announce_button',
|
||||
debug)
|
||||
redirect_headers(self, actor_path_str, cookie, calling_domain)
|
||||
|
|
|
@ -88,8 +88,10 @@ def post_to_outbox(self, message_json: {}, version: str,
|
|||
self.server.shared_item_federation_tokens
|
||||
return post_message_to_outbox(curr_session,
|
||||
self.server.translate,
|
||||
message_json, self.post_to_nickname,
|
||||
self.server, self.server.base_dir,
|
||||
message_json,
|
||||
self.post_to_nickname,
|
||||
self.server,
|
||||
self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
self.server.domain,
|
||||
self.server.domain_full,
|
||||
|
|
Loading…
Reference in New Issue