Apply additional filters to downloaded announces

main
bashrc 2026-01-17 17:24:25 +00:00
parent a7c7f1c8ec
commit 86e02ba085
32 changed files with 821 additions and 156 deletions

View File

@ -3110,7 +3110,11 @@ def daemon_http_get(self) -> None:
self.server.buy_sites, self.server.buy_sites,
self.server.auto_cw_cache, self.server.auto_cw_cache,
self.server.mitm_servers, self.server.mitm_servers,
self.server.instance_software) self.server.instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if msg: if msg:
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)

View File

@ -318,7 +318,11 @@ def delete_button(self, calling_domain: str, path: str,
buy_sites, buy_sites,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if delete_str: if delete_str:
delete_str_len = len(delete_str) delete_str_len = len(delete_str)
set_headers(self, 'text/html', delete_str_len, set_headers(self, 'text/html', delete_str_len,

View File

@ -268,7 +268,11 @@ def announce_button(self, calling_domain: str, path: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
actor_absolute = \ actor_absolute = \
get_instance_url(calling_domain, get_instance_url(calling_domain,

View File

@ -223,7 +223,11 @@ def bookmark_button(self, calling_domain: str, path: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
else: else:
print('WARN: Bookmarked post not found: ' + bookmark_filename) print('WARN: Bookmarked post not found: ' + bookmark_filename)
actor_absolute = \ actor_absolute = \
@ -438,7 +442,11 @@ def bookmark_button_undo(self, calling_domain: str, path: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
else: else:
print('WARN: Unbookmarked post not found: ' + print('WARN: Unbookmarked post not found: ' +
bookmark_filename) bookmark_filename)

View File

@ -270,7 +270,11 @@ def like_button(self, calling_domain: str, path: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
else: else:
print('WARN: Liked post not found: ' + liked_post_filename) print('WARN: Liked post not found: ' + liked_post_filename)
# clear the icon from the cache so that it gets updated # clear the icon from the cache so that it gets updated
@ -529,7 +533,11 @@ def like_button_undo(self, calling_domain: str, path: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
else: else:
print('WARN: Unliked post not found: ' + liked_post_filename) print('WARN: Unliked post not found: ' + liked_post_filename)
# clear the icon from the cache so that it gets updated # clear the icon from the cache so that it gets updated

View File

@ -185,7 +185,11 @@ def mute_button(self, calling_domain: str, path: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
else: else:
print('WARN: Muted post not found: ' + mute_filename) print('WARN: Muted post not found: ' + mute_filename)
@ -366,7 +370,11 @@ def mute_button_undo(self, calling_domain: str, path: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
else: else:
print('WARN: Unmuted post not found: ' + mute_filename) print('WARN: Unmuted post not found: ' + mute_filename)
if calling_domain.endswith('.onion') and onion_domain: if calling_domain.endswith('.onion') and onion_domain:

View File

@ -299,7 +299,11 @@ def reaction_button(self, calling_domain: str, path: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
else: else:
print('WARN: Emoji reaction post not found: ' + print('WARN: Emoji reaction post not found: ' +
reaction_post_filename) reaction_post_filename)
@ -580,7 +584,11 @@ def reaction_button_undo(self, calling_domain: str, path: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
else: else:
print('WARN: Unreaction post not found: ' + print('WARN: Unreaction post not found: ' +
reaction_post_filename) reaction_post_filename)

View File

@ -174,7 +174,11 @@ def show_shares_feed(self, authorized: bool,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software, instance_software,
hide_recent_posts) hide_recent_posts,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -368,7 +372,11 @@ def show_following_feed(self, authorized: bool,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software, instance_software,
hide_recent_posts).encode('utf-8') hide_recent_posts,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', set_headers(self, 'text/html',
msglen, cookie, calling_domain, False) msglen, cookie, calling_domain, False)
@ -563,7 +571,11 @@ def show_moved_feed(self, authorized: bool,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software, instance_software,
hide_recent_posts).encode('utf-8') hide_recent_posts,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', set_headers(self, 'text/html',
msglen, cookie, calling_domain, False) msglen, cookie, calling_domain, False)
@ -751,7 +763,11 @@ def show_inactive_feed(self, authorized: bool,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software, instance_software,
hide_recent_posts).encode('utf-8') hide_recent_posts,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', set_headers(self, 'text/html',
msglen, cookie, calling_domain, False) msglen, cookie, calling_domain, False)
@ -942,7 +958,11 @@ def show_followers_feed(self, authorized: bool,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software, instance_software,
hide_recent_posts).encode('utf-8') hide_recent_posts,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
cookie, calling_domain, False) cookie, calling_domain, False)

View File

@ -240,7 +240,11 @@ def hashtag_search2(self, calling_domain: str,
buy_sites, buy_sites,
auto_cw_cache, ua_str, auto_cw_cache, ua_str,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if hashtag_str: if hashtag_str:
msg = hashtag_str.encode('utf-8') msg = hashtag_str.encode('utf-8')
msglen = len(msg) msglen = len(msg)

View File

@ -173,7 +173,11 @@ def _show_post_from_file(self, post_filename: str, liked_by: str,
mitm_servers, mitm_servers,
instance_software, instance_software,
ua_str, ua_str,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_html_post_headers(self, msglen, set_html_post_headers(self, msglen,
@ -543,7 +547,11 @@ def show_new_post(self, edit_post_params: {},
searchable_by_default, searchable_by_default,
mitm_servers, mitm_servers,
instance_software, instance_software,
ua_str) ua_str,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if not msg: if not msg:
print('Error replying to ' + in_reply_to_url) print('Error replying to ' + in_reply_to_url)
http_404(self, 104) http_404(self, 104)
@ -802,7 +810,11 @@ def show_likers_of_post(self, authorized: bool,
auto_cw_cache, 'likes', auto_cw_cache, 'likes',
mitm_servers, mitm_servers,
instance_software, instance_software,
ua_str) ua_str,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if not msg: if not msg:
http_404(self, 69) http_404(self, 69)
return True return True
@ -901,7 +913,11 @@ def show_announcers_of_post(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
'shares', mitm_servers, 'shares', mitm_servers,
instance_software, instance_software,
ua_str) ua_str,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if not msg: if not msg:
http_404(self, 70) http_404(self, 70)
return True return True
@ -1055,7 +1071,11 @@ def show_replies_to_post(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1172,7 +1192,11 @@ def show_replies_to_post(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1431,7 +1455,11 @@ def show_conversation_thread(self, authorized: bool,
ua_str, ua_str,
default_timeline, default_timeline,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if conv_str: if conv_str:
msg = conv_str.encode('utf-8') msg = conv_str.encode('utf-8')
msglen = len(msg) msglen = len(msg)

View File

@ -157,7 +157,11 @@ def show_person_profile(self, authorized: bool,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software, instance_software,
hide_recent_posts).encode('utf-8') hide_recent_posts,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr).encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
cookie, calling_domain, False) cookie, calling_domain, False)
@ -325,7 +329,11 @@ def show_roles(self, calling_domain: str, referer_domain: str,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software, instance_software,
hide_recent_posts) hide_recent_posts,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -482,7 +490,11 @@ def show_skills(self, calling_domain: str, referer_domain: str,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software, instance_software,
hide_recent_posts) hide_recent_posts,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,

View File

@ -153,7 +153,11 @@ def reaction_picker2(self, calling_domain: str, path: str,
buy_sites, buy_sites,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,

View File

@ -205,7 +205,11 @@ def show_media_timeline(self, authorized: bool,
show_announces, show_announces,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -417,7 +421,11 @@ def show_blogs_timeline(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -634,7 +642,11 @@ def show_news_timeline(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -845,7 +857,11 @@ def show_features_timeline(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1016,7 +1032,11 @@ def show_shares_timeline(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1163,7 +1183,11 @@ def show_wanted_timeline(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1346,7 +1370,11 @@ def show_bookmarks_timeline(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1565,7 +1593,11 @@ def show_outbox_timeline(self, authorized: bool,
show_announces, show_announces,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1758,7 +1790,11 @@ def show_mod_timeline(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -1965,7 +2001,11 @@ def show_dms(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -2176,7 +2216,11 @@ def show_replies(self, authorized: bool,
auto_cw_cache, auto_cw_cache,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
set_headers(self, 'text/html', msglen, set_headers(self, 'text/html', msglen,
@ -2400,7 +2444,11 @@ def show_inbox(self, authorized: bool,
show_announces, show_announces,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if getreq_start_time: if getreq_start_time:
fitness_performance(getreq_start_time, fitness, fitness_performance(getreq_start_time, fitness,
'_GET', '_show_inbox3', '_GET', '_show_inbox3',

View File

@ -332,7 +332,11 @@ def _person_options_view(self, options_confirm_params: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
ua_str, ua_str,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if profile_str: if profile_str:
msg = profile_str.encode('utf-8') msg = profile_str.encode('utf-8')
msglen = len(msg) msglen = len(msg)
@ -1007,7 +1011,11 @@ def _person_options_dm(self, options_confirm_params: str,
searchable_by_default, searchable_by_default,
mitm_servers, mitm_servers,
instance_software, instance_software,
ua_str) ua_str,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if msg: if msg:
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)
@ -1250,7 +1258,11 @@ def _person_options_report(self, options_confirm_params: str,
searchable_by_default, searchable_by_default,
mitm_servers, mitm_servers,
instance_software, instance_software,
ua_str) ua_str,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if msg: if msg:
msg = msg.encode('utf-8') msg = msg.encode('utf-8')
msglen = len(msg) msglen = len(msg)

View File

@ -232,7 +232,11 @@ def _receive_new_post_process_newpost(self, fields: {},
auto_cw_cache, auto_cw_cache,
onion_domain, i2p_domain, onion_domain, i2p_domain,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
print('DEBUG: sending edited public post ' + print('DEBUG: sending edited public post ' +
str(message_json)) str(message_json))
if fields['schedulePost']: if fields['schedulePost']:
@ -651,7 +655,11 @@ def _receive_new_post_process_newunlisted(self, fields: {},
auto_cw_cache, auto_cw_cache,
onion_domain, i2p_domain, onion_domain, i2p_domain,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
print('DEBUG: sending edited unlisted post ' + print('DEBUG: sending edited unlisted post ' +
str(message_json)) str(message_json))
@ -827,7 +835,11 @@ def _receive_new_post_process_newfollowers(self, fields: {},
auto_cw_cache, auto_cw_cache,
onion_domain, i2p_domain, onion_domain, i2p_domain,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
print('DEBUG: sending edited followers post ' + print('DEBUG: sending edited followers post ' +
str(message_json)) str(message_json))
@ -1012,7 +1024,11 @@ def _receive_new_post_process_newdm(self, fields: {},
auto_cw_cache, auto_cw_cache,
onion_domain, i2p_domain, onion_domain, i2p_domain,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
print('DEBUG: sending edited dm post ' + print('DEBUG: sending edited dm post ' +
str(message_json)) str(message_json))
@ -1181,7 +1197,11 @@ def _receive_new_post_process_newreminder(self, fields: {}, nickname: str,
auto_cw_cache, auto_cw_cache,
onion_domain, i2p_domain, onion_domain, i2p_domain,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
print('DEBUG: sending edited reminder post ' + print('DEBUG: sending edited reminder post ' +
str(message_json)) str(message_json))
if post_to_outbox(self, message_json, if post_to_outbox(self, message_json,
@ -1535,7 +1555,11 @@ def _receive_new_post_process_newreading(self, fields: {},
auto_cw_cache, auto_cw_cache,
onion_domain, i2p_domain, onion_domain, i2p_domain,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
print('DEBUG: sending edited reading status post ' + print('DEBUG: sending edited reading status post ' +
str(message_json)) str(message_json))
if fields['schedulePost']: if fields['schedulePost']:

View File

@ -137,7 +137,11 @@ def _receive_search_hashtag(self, actor_str: str,
buy_sites, buy_sites,
auto_cw_cache, ua_str, auto_cw_cache, ua_str,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if hashtag_str: if hashtag_str:
msg = hashtag_str.encode('utf-8') msg = hashtag_str.encode('utf-8')
msglen = len(msg) msglen = len(msg)
@ -289,7 +293,11 @@ def _receive_search_my_posts(self, search_str: str,
buy_sites, buy_sites,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if history_str: if history_str:
msg = history_str.encode('utf-8') msg = history_str.encode('utf-8')
msglen = len(msg) msglen = len(msg)
@ -404,7 +412,11 @@ def _receive_search_bookmarks(self, search_str: str,
buy_sites, buy_sites,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if bookmarks_str: if bookmarks_str:
msg = bookmarks_str.encode('utf-8') msg = bookmarks_str.encode('utf-8')
msglen = len(msg) msglen = len(msg)
@ -611,7 +623,11 @@ def _receive_search_handle(self, search_str: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
ua_str, ua_str,
instance_software) instance_software,
self.server.block_military,
self.server.block_government,
self.server.block_bluesky,
self.server.block_nostr)
if profile_str: if profile_str:
msg = profile_str.encode('utf-8') msg = profile_str.encode('utf-8')
msglen = len(msg) msglen = len(msg)

View File

@ -860,6 +860,10 @@ def _read_local_box_post(session, nickname: str, domain: str,
get_person_from_cache(base_dir, person_url, person_cache) get_person_from_cache(base_dir, person_url, person_cache)
if actor_json: if actor_json:
languages_understood = get_actor_languages_list(actor_json) languages_understood = get_actor_languages_list(actor_json)
block_military = {}
block_government = {}
block_bluesky = {}
block_nostr = {}
post_json_object2 = \ post_json_object2 = \
download_announce(session, base_dir, download_announce(session, base_dir,
http_prefix, http_prefix,
@ -876,7 +880,11 @@ def _read_local_box_post(session, nickname: str, domain: str,
blocked_cache, block_federated, bold_reading, blocked_cache, block_federated, bold_reading,
show_vote_posts, show_vote_posts,
languages_understood, languages_understood,
mitm_servers) mitm_servers,
block_military,
block_government,
block_bluesky,
block_nostr)
if post_json_object2: if post_json_object2:
if has_object_dict(post_json_object2): if has_object_dict(post_json_object2):
if post_json_object2['object'].get('attributedTo') and \ if post_json_object2['object'].get('attributedTo') and \
@ -2826,6 +2834,10 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
yt_replace_domain = None yt_replace_domain = None
twitter_replacement_domain = None twitter_replacement_domain = None
show_vote_posts = False show_vote_posts = False
block_military = {}
block_government = {}
block_bluesky = {}
block_nostr = {}
post_json_object2 = \ post_json_object2 = \
download_announce(session, base_dir, download_announce(session, base_dir,
http_prefix, http_prefix,
@ -2844,7 +2856,11 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
bold_reading, bold_reading,
show_vote_posts, show_vote_posts,
languages_understood, languages_understood,
mitm_servers) mitm_servers,
block_military,
block_government,
block_bluesky,
block_nostr)
if post_json_object2: if post_json_object2:
post_json_object = post_json_object2 post_json_object = post_json_object2
if post_json_object: if post_json_object:

View File

@ -198,7 +198,11 @@ def _inbox_store_post_to_html_cache(recent_posts_cache: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}, instance_software: {},
mutuals_list: []) -> None: mutuals_list: [],
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> None:
"""Converts the json post into html and stores it in a cache """Converts the json post into html and stores it in a cache
This enables the post to be quickly displayed later This enables the post to be quickly displayed later
""" """
@ -230,7 +234,11 @@ def _inbox_store_post_to_html_cache(recent_posts_cache: {},
bold_reading, dogwhistles, minimize_all_images, bold_reading, dogwhistles, minimize_all_images,
None, buy_sites, auto_cw_cache, None, buy_sites, auto_cw_cache,
mitm_servers, instance_software, mitm_servers, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
def valid_inbox(base_dir: str, nickname: str, domain: str) -> bool: def valid_inbox(base_dir: str, nickname: str, domain: str) -> bool:
@ -824,7 +832,11 @@ def update_edited_post(base_dir: str,
onion_domain: str, onion_domain: str,
i2p_domain: str, i2p_domain: str,
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> None: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> None:
""" When an edited post is created this assigns """ When an edited post is created this assigns
a published and updated date to it, and uses a published and updated date to it, and uses
the previous id the previous id
@ -876,7 +888,11 @@ def update_edited_post(base_dir: str,
auto_cw_cache, auto_cw_cache,
onion_domain, i2p_domain, onion_domain, i2p_domain,
mitm_servers, mitm_servers,
instance_software) instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
# update the index # update the index
id_str = edited_postid.split('/')[-1] id_str = edited_postid.split('/')[-1]
@ -1903,7 +1919,11 @@ def _inbox_after_initial(server, inbox_start_time,
bold_reading, dogwhistles, bold_reading, dogwhistles,
server.min_images_for_accounts, server.min_images_for_accounts,
buy_sites, server.auto_cw_cache, buy_sites, server.auto_cw_cache,
mitm_servers, instance_software): mitm_servers, instance_software,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr):
if debug: if debug:
print('DEBUG: Like accepted from ' + actor) print('DEBUG: Like accepted from ' + actor)
fitness_performance(inbox_start_time, server.fitness, fitness_performance(inbox_start_time, server.fitness,
@ -1931,7 +1951,11 @@ def _inbox_after_initial(server, inbox_start_time,
bold_reading, dogwhistles, bold_reading, dogwhistles,
server.min_images_for_accounts, server.min_images_for_accounts,
buy_sites, server.auto_cw_cache, buy_sites, server.auto_cw_cache,
mitm_servers, instance_software): mitm_servers, instance_software,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr):
if debug: if debug:
print('DEBUG: Undo like accepted from ' + actor) print('DEBUG: Undo like accepted from ' + actor)
fitness_performance(inbox_start_time, server.fitness, fitness_performance(inbox_start_time, server.fitness,
@ -1962,7 +1986,11 @@ def _inbox_after_initial(server, inbox_start_time,
buy_sites, server.auto_cw_cache, buy_sites, server.auto_cw_cache,
mitm_servers, instance_software, mitm_servers, instance_software,
server.blocked_cache, server.blocked_cache,
server.block_federated): server.block_federated,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr):
if debug: if debug:
print('DEBUG: Reaction accepted from ' + actor) print('DEBUG: Reaction accepted from ' + actor)
fitness_performance(inbox_start_time, server.fitness, fitness_performance(inbox_start_time, server.fitness,
@ -1991,7 +2019,11 @@ def _inbox_after_initial(server, inbox_start_time,
bold_reading, dogwhistles, bold_reading, dogwhistles,
server.min_images_for_accounts, server.min_images_for_accounts,
buy_sites, server.auto_cw_cache, buy_sites, server.auto_cw_cache,
mitm_servers, instance_software): mitm_servers, instance_software,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr):
if debug: if debug:
print('DEBUG: Zot reaction accepted from ' + actor) print('DEBUG: Zot reaction accepted from ' + actor)
fitness_performance(inbox_start_time, server.fitness, fitness_performance(inbox_start_time, server.fitness,
@ -2019,7 +2051,11 @@ def _inbox_after_initial(server, inbox_start_time,
bold_reading, dogwhistles, bold_reading, dogwhistles,
server.min_images_for_accounts, server.min_images_for_accounts,
buy_sites, server.auto_cw_cache, buy_sites, server.auto_cw_cache,
mitm_servers, instance_software): mitm_servers, instance_software,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr):
if debug: if debug:
print('DEBUG: Undo reaction accepted from ' + actor) print('DEBUG: Undo reaction accepted from ' + actor)
fitness_performance(inbox_start_time, server.fitness, fitness_performance(inbox_start_time, server.fitness,
@ -2048,7 +2084,11 @@ def _inbox_after_initial(server, inbox_start_time,
server.min_images_for_accounts, server.min_images_for_accounts,
server.buy_sites, server.buy_sites,
server.auto_cw_cache, server.auto_cw_cache,
mitm_servers, instance_software): mitm_servers, instance_software,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr):
if debug: if debug:
print('DEBUG: Bookmark accepted from ' + actor) print('DEBUG: Bookmark accepted from ' + actor)
fitness_performance(inbox_start_time, server.fitness, fitness_performance(inbox_start_time, server.fitness,
@ -2077,7 +2117,11 @@ def _inbox_after_initial(server, inbox_start_time,
server.min_images_for_accounts, server.min_images_for_accounts,
server.buy_sites, server.buy_sites,
server.auto_cw_cache, server.auto_cw_cache,
mitm_servers, instance_software): mitm_servers, instance_software,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr):
if debug: if debug:
print('DEBUG: Undo bookmark accepted from ' + actor) print('DEBUG: Undo bookmark accepted from ' + actor)
fitness_performance(inbox_start_time, server.fitness, fitness_performance(inbox_start_time, server.fitness,
@ -2126,7 +2170,11 @@ def _inbox_after_initial(server, inbox_start_time,
languages_understood, languages_understood,
server.auto_cw_cache, server.auto_cw_cache,
server.block_federated, server.block_federated,
mitm_servers, instance_software): mitm_servers, instance_software,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr):
if debug: if debug:
print('DEBUG: Announce accepted from ' + actor) print('DEBUG: Announce accepted from ' + actor)
fitness_performance(inbox_start_time, server.fitness, fitness_performance(inbox_start_time, server.fitness,
@ -2528,6 +2576,7 @@ def _inbox_after_initial(server, inbox_start_time,
min_img_for_accounts = \ min_img_for_accounts = \
server.min_images_for_accounts server.min_images_for_accounts
instance_software = server.instance_software instance_software = server.instance_software
block_government = server.block_government
_inbox_store_post_to_html_cache(recent_posts_cache, _inbox_store_post_to_html_cache(recent_posts_cache,
max_recent_posts, max_recent_posts,
translate, base_dir, translate, base_dir,
@ -2557,7 +2606,11 @@ def _inbox_after_initial(server, inbox_start_time,
server.auto_cw_cache, server.auto_cw_cache,
server.mitm_servers, server.mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
server.block_military,
block_government,
server.block_bluesky,
server.block_nostr)
fitness_performance(inbox_start_time, fitness_performance(inbox_start_time,
server.fitness, server.fitness,
'INBOX', 'INBOX',
@ -3778,7 +3831,11 @@ def run_inbox_queue(server,
server.auto_cw_cache, server.auto_cw_cache,
onion_domain, onion_domain,
i2p_domain, server.mitm_servers, i2p_domain, server.mitm_servers,
server.instance_software): server.instance_software,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr):
if debug: if debug:
print('Queue: Update accepted from ' + key_id) print('Queue: Update accepted from ' + key_id)
if os.path.isfile(queue_filename): if os.path.isfile(queue_filename):

View File

@ -390,7 +390,11 @@ def receive_edit_to_post(recent_posts_cache: {}, message_json: {},
onion_domain: str, onion_domain: str,
i2p_domain: str, i2p_domain: str,
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> bool: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> bool:
"""A post was edited """A post was edited
""" """
if not has_object_dict(message_json): if not has_object_dict(message_json):
@ -535,7 +539,11 @@ def receive_edit_to_post(recent_posts_cache: {}, message_json: {},
minimize_all_images, None, minimize_all_images, None,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, instance_software, mitm_servers, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
return True return True
@ -673,7 +681,11 @@ def receive_update_activity(recent_posts_cache: {}, session, base_dir: str,
onion_domain: str, onion_domain: str,
i2p_domain: str, i2p_domain: str,
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> bool: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> bool:
"""Receives an Update activity within the POST section of HTTPServer """Receives an Update activity within the POST section of HTTPServer
""" """
if message_json['type'] != 'Update': if message_json['type'] != 'Update':
@ -721,7 +733,11 @@ def receive_update_activity(recent_posts_cache: {}, session, base_dir: str,
auto_cw_cache, auto_cw_cache,
onion_domain, i2p_domain, onion_domain, i2p_domain,
mitm_servers, mitm_servers,
instance_software): instance_software,
block_military,
block_government,
block_bluesky,
block_nostr):
print('EDITPOST: received ' + message_json['object']['id']) print('EDITPOST: received ' + message_json['object']['id'])
return True return True
else: else:
@ -979,7 +995,11 @@ def receive_like(recent_posts_cache: {},
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> bool: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> bool:
"""Receives a Like activity within the POST section of HTTPServer """Receives a Like activity within the POST section of HTTPServer
""" """
if message_json['type'] != 'Like': if message_json['type'] != 'Like':
@ -1098,7 +1118,11 @@ def receive_like(recent_posts_cache: {},
bold_reading, dogwhistles, bold_reading, dogwhistles,
minimize_all_images, None, buy_sites, minimize_all_images, None, buy_sites,
auto_cw_cache, mitm_servers, auto_cw_cache, mitm_servers,
instance_software, mutuals_list) instance_software, mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
return True return True
@ -1187,7 +1211,11 @@ def receive_reaction(recent_posts_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}, instance_software: {},
blocked_cache: [], blocked_cache: [],
block_federated: []) -> bool: block_federated: [],
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> bool:
"""Receives an emoji reaction within the POST section of HTTPServer """Receives an emoji reaction within the POST section of HTTPServer
""" """
if message_json['type'] != 'EmojiReact': if message_json['type'] != 'EmojiReact':
@ -1341,7 +1369,11 @@ def receive_reaction(recent_posts_cache: {},
bold_reading, dogwhistles, bold_reading, dogwhistles,
minimize_all_images, None, buy_sites, minimize_all_images, None, buy_sites,
auto_cw_cache, mitm_servers, auto_cw_cache, mitm_servers,
instance_software, mutuals_list) instance_software, mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
return True return True
@ -1367,7 +1399,11 @@ def receive_zot_reaction(recent_posts_cache: {},
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> bool: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> bool:
"""Receives an zot-style emoji reaction within the POST section of """Receives an zot-style emoji reaction within the POST section of
HTTPServer A zot style emoji reaction is an ordinary reply Note whose HTTPServer A zot style emoji reaction is an ordinary reply Note whose
content is exactly one emoji content is exactly one emoji
@ -1534,7 +1570,11 @@ def receive_zot_reaction(recent_posts_cache: {},
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
return True return True
@ -1558,7 +1598,11 @@ def receive_bookmark(recent_posts_cache: {},
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> bool: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> bool:
"""Receives a bookmark activity within the POST section of HTTPServer """Receives a bookmark activity within the POST section of HTTPServer
""" """
if not message_json.get('type'): if not message_json.get('type'):
@ -1667,7 +1711,11 @@ def receive_bookmark(recent_posts_cache: {},
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
return True return True
@ -1772,7 +1820,11 @@ def receive_announce(recent_posts_cache: {},
auto_cw_cache: {}, auto_cw_cache: {},
block_federated: [], block_federated: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> bool: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> bool:
"""Receives an announce activity within the POST section of HTTPServer """Receives an announce activity within the POST section of HTTPServer
""" """
if message_json['type'] != 'Announce': if message_json['type'] != 'Announce':
@ -1953,7 +2005,11 @@ def receive_announce(recent_posts_cache: {},
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
if not announce_html: if not announce_html:
print('WARN: Unable to generate html for announce ' + print('WARN: Unable to generate html for announce ' +
str(message_json)) str(message_json))
@ -1978,7 +2034,11 @@ def receive_announce(recent_posts_cache: {},
bold_reading, bold_reading,
show_vote_posts, show_vote_posts,
languages_understood, languages_understood,
mitm_servers) mitm_servers,
block_military,
block_government,
block_bluesky,
block_nostr)
# are annouced/boosted replies allowed? # are annouced/boosted replies allowed?
announce_denied = False announce_denied = False
if post_json_object: if post_json_object:
@ -2174,7 +2234,11 @@ def receive_question_vote(server, base_dir: str, nickname: str, domain: str,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr)
# add id to inbox index # add id to inbox index
inbox_update_index('inbox', base_dir, handle, inbox_update_index('inbox', base_dir, handle,

View File

@ -178,7 +178,11 @@ def receive_undo_like(recent_posts_cache: {},
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> bool: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> bool:
"""Receives an undo like activity within the POST section of HTTPServer """Receives an undo like activity within the POST section of HTTPServer
""" """
if message_json['type'] != 'Undo': if message_json['type'] != 'Undo':
@ -286,7 +290,11 @@ def receive_undo_like(recent_posts_cache: {},
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
return True return True
@ -311,7 +319,11 @@ def receive_undo_reaction(recent_posts_cache: {},
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> bool: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> bool:
"""Receives an undo emoji reaction within the POST section of HTTPServer """Receives an undo emoji reaction within the POST section of HTTPServer
""" """
if message_json['type'] != 'Undo': if message_json['type'] != 'Undo':
@ -437,7 +449,11 @@ def receive_undo_reaction(recent_posts_cache: {},
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
return True return True
@ -461,7 +477,11 @@ def receive_undo_bookmark(recent_posts_cache: {},
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> bool: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> bool:
"""Receives an undo bookmark activity within the POST section of HTTPServer """Receives an undo bookmark activity within the POST section of HTTPServer
""" """
if not message_json.get('type'): if not message_json.get('type'):
@ -570,7 +590,11 @@ def receive_undo_bookmark(recent_posts_cache: {},
dogwhistles, minimize_all_images, None, dogwhistles, minimize_all_images, None,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, instance_software, mitm_servers, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
return True return True

View File

@ -703,7 +703,11 @@ def post_message_to_outbox(session, translate: {},
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
server.block_military,
server.block_government,
server.block_bluesky,
server.block_nostr)
if is_edited_post: if is_edited_post:
message_json['type'] = 'Update' message_json['type'] = 'Update'

View File

@ -116,6 +116,10 @@ from auth import create_basic_auth_header
from blocking import is_blocked_hashtag from blocking import is_blocked_hashtag
from blocking import is_blocked from blocking import is_blocked
from blocking import is_blocked_domain from blocking import is_blocked_domain
from blocking import contains_military_domain
from blocking import contains_government_domain
from blocking import contains_bluesky_domain
from blocking import contains_nostr_domain
from filters import is_filtered from filters import is_filtered
from filters import is_question_filtered from filters import is_question_filtered
from git import convert_post_to_patch from git import convert_post_to_patch
@ -4563,6 +4567,10 @@ def is_image_media(session, base_dir: str, http_prefix: str,
if post_json_object['type'] == 'Announce': if post_json_object['type'] == 'Announce':
blocked_cache = {} blocked_cache = {}
block_federated: list[str] = [] block_federated: list[str] = []
block_military = {}
block_government = {}
block_bluesky = {}
block_nostr = {}
post_json_announce = \ post_json_announce = \
download_announce(session, base_dir, http_prefix, download_announce(session, base_dir, http_prefix,
nickname, domain, post_json_object, nickname, domain, post_json_object,
@ -4578,7 +4586,11 @@ def is_image_media(session, base_dir: str, http_prefix: str,
bold_reading, bold_reading,
show_vote_posts, show_vote_posts,
languages_understood, languages_understood,
mitm_servers) mitm_servers,
block_military,
block_government,
block_bluesky,
block_nostr)
if post_json_announce: if post_json_announce:
post_json_object = post_json_announce post_json_object = post_json_announce
if post_json_object['type'] != 'Create': if post_json_object['type'] != 'Create':
@ -6365,7 +6377,11 @@ def download_announce(session, base_dir: str, http_prefix: str,
bold_reading: bool, bold_reading: bool,
show_vote_posts: bool, show_vote_posts: bool,
languages_understood: [], languages_understood: [],
mitm_servers: []) -> {}: mitm_servers: [],
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> {}:
"""Download the post referenced by an announce """Download the post referenced by an announce
""" """
if not post_json_object.get('object'): if not post_json_object.get('object'):
@ -6487,13 +6503,41 @@ def download_announce(session, base_dir: str, http_prefix: str,
if announced_json.get('attributedTo'): if announced_json.get('attributedTo'):
announced_actor = get_attributed_to(announced_json['attributedTo']) announced_actor = get_attributed_to(announced_json['attributedTo'])
announced_json_str = str(announced_json)
if not announced_json.get('type'): if not announced_json.get('type'):
print('WARN: announced post does not have a type ' + print('WARN: announced post does not have a type ' +
str(announced_json)) announced_json_str)
_reject_announce(announce_filename, _reject_announce(announce_filename,
base_dir, nickname, domain, post_id, base_dir, nickname, domain, post_id,
recent_posts_cache, debug) recent_posts_cache, debug)
return None return None
# check for blocked content
if block_military.get(nickname):
if contains_military_domain(announced_json_str):
_reject_announce(announce_filename,
base_dir, nickname, domain, post_id,
recent_posts_cache, debug)
return None
if block_government.get(nickname):
if contains_government_domain(announced_json_str):
_reject_announce(announce_filename,
base_dir, nickname, domain, post_id,
recent_posts_cache, debug)
return None
if block_bluesky.get(nickname):
if contains_bluesky_domain(announced_json_str):
_reject_announce(announce_filename,
base_dir, nickname, domain, post_id,
recent_posts_cache, debug)
return None
if block_nostr.get(nickname):
if contains_nostr_domain(announced_json_str):
_reject_announce(announce_filename,
base_dir, nickname, domain, post_id,
recent_posts_cache, debug)
return None
if announced_json['type'] == 'Video': if announced_json['type'] == 'Video':
converted_json = \ converted_json = \
convert_video_to_note(base_dir, nickname, domain, convert_video_to_note(base_dir, nickname, domain,

View File

@ -47,7 +47,11 @@ def html_confirm_delete(server,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Shows a screen asking to confirm the deletion of a post """Shows a screen asking to confirm the deletion of a post
""" """
if '/statuses/' not in message_id: if '/statuses/' not in message_id:
@ -111,7 +115,11 @@ def html_confirm_delete(server,
bold_reading, dogwhistles, bold_reading, dogwhistles,
minimize_all_images, None, buy_sites, minimize_all_images, None, buy_sites,
auto_cw_cache, mitm_servers, auto_cw_cache, mitm_servers,
instance_software, mutuals_list) instance_software, mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
delete_post_str += '<center>' delete_post_str += '<center>'
delete_post_str += \ delete_post_str += \
' <p class="followText">' + \ ' <p class="followText">' + \

View File

@ -59,7 +59,11 @@ def html_conversation_view(authorized: bool, post_id: str,
ua_str: str, ua_str: str,
default_timeline: str, default_timeline: str,
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show a page containing a conversation thread """Show a page containing a conversation thread
""" """
conv_posts = \ conv_posts = \
@ -163,7 +167,11 @@ def html_conversation_view(authorized: bool, post_id: str,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
if post_str: if post_str:
conv_str += \ conv_str += \
current_reading_str + text_mode_separator + \ current_reading_str + text_mode_separator + \

View File

@ -280,7 +280,11 @@ def html_new_post(edit_post_params: {},
searchable_by_default: str, searchable_by_default: str,
mitm_servers: [], mitm_servers: [],
instance_software: {}, instance_software: {},
ua_str: str) -> str: ua_str: str,
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""New post screen """New post screen
""" """
# get the json if this is an edited post # get the json if this is an edited post
@ -468,7 +472,11 @@ def html_new_post(edit_post_params: {},
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
new_post_text += \ new_post_text += \
open_content_warning(replied_to_post, translate) open_content_warning(replied_to_post, translate)
# about the author # about the author

View File

@ -45,7 +45,11 @@ def _html_front_screen_posts(recent_posts_cache: {}, max_recent_posts: int,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Shows posts on the front screen of a news instance """Shows posts on the front screen of a news instance
These should only be public blog posts from the features timeline These should only be public blog posts from the features timeline
which is the blog timeline of the news actor which is the blog timeline of the news actor
@ -108,7 +112,11 @@ def _html_front_screen_posts(recent_posts_cache: {}, max_recent_posts: int,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
if post_str: if post_str:
profile_str += post_str + separator_str profile_str += post_str + separator_str
ctr += 1 ctr += 1
@ -142,7 +150,11 @@ def html_front_screen(signing_priv_key_pem: str,
auto_cw_cache: {}, auto_cw_cache: {},
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the news instance front screen """Show the news instance front screen
""" """
bold_reading = False bold_reading = False
@ -222,7 +234,11 @@ def html_front_screen(signing_priv_key_pem: str,
buy_sites, buy_sites,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software) + license_str instance_software,
block_military,
block_government,
block_bluesky,
block_nostr) + license_str
# Footer which is only used for system accounts # Footer which is only used for system accounts
profile_footer_str = ' </td>\n' profile_footer_str = ' </td>\n'

View File

@ -51,7 +51,11 @@ def html_likers_of_post(base_dir: str, nickname: str,
dict_name: str, dict_name: str,
mitm_servers: [], mitm_servers: [],
instance_software: {}, instance_software: {},
ua_str: str) -> str: ua_str: str,
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Returns html for a screen showing who liked a post """Returns html for a screen showing who liked a post
""" """
css_filename = base_dir + '/epicyon-profile.css' css_filename = base_dir + '/epicyon-profile.css'
@ -129,7 +133,11 @@ def html_likers_of_post(base_dir: str, nickname: str,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
# show likers beneath the post # show likers beneath the post
obj = post_json_object obj = post_json_object

View File

@ -68,7 +68,11 @@ def html_moderation(default_timeline: str,
auto_cw_cache: {}, auto_cw_cache: {},
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the moderation feed as html """Show the moderation feed as html
This is what you see when selecting the "mod" timeline This is what you see when selecting the "mod" timeline
""" """
@ -99,7 +103,11 @@ def html_moderation(default_timeline: str,
min_images_for_accounts, reverse_sequence, None, min_images_for_accounts, reverse_sequence, None,
buy_sites, auto_cw_cache, show_announces, buy_sites, auto_cw_cache, show_announces,
known_epicyon_instances, mitm_servers, known_epicyon_instances, mitm_servers,
instance_software) instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_account_info(translate: {}, def html_account_info(translate: {},

View File

@ -2330,7 +2330,11 @@ def individual_post_as_html(signing_priv_key_pem: str,
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}, instance_software: {},
mutuals_list: []) -> str: mutuals_list: [],
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
""" Shows a single post as html """ Shows a single post as html
""" """
if not post_json_object: if not post_json_object:
@ -2527,7 +2531,11 @@ def individual_post_as_html(signing_priv_key_pem: str,
bold_reading, bold_reading,
show_vote_posts, show_vote_posts,
languages_understood, languages_understood,
mitm_servers) mitm_servers,
block_military,
block_government,
block_bluesky,
block_nostr)
if not post_json_announce: if not post_json_announce:
# if the announce could not be downloaded then mark it as rejected # if the announce could not be downloaded then mark it as rejected
announced_post_id = remove_id_ending(post_json_object['id']) announced_post_id = remove_id_ending(post_json_object['id'])
@ -3450,7 +3458,11 @@ def html_individual_post(recent_posts_cache: {}, max_recent_posts: int,
auto_cw_cache: {}, mitm_servers: [], auto_cw_cache: {}, mitm_servers: [],
instance_software: {}, instance_software: {},
ua_str: str, ua_str: str,
mutuals_list: []) -> str: mutuals_list: [],
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show an individual post as html """Show an individual post as html
""" """
original_post_json = post_json_object original_post_json = post_json_object
@ -3548,7 +3560,11 @@ def html_individual_post(recent_posts_cache: {}, max_recent_posts: int,
bold_reading, dogwhistles, bold_reading, dogwhistles,
minimize_all_images, None, buy_sites, minimize_all_images, None, buy_sites,
auto_cw_cache, mitm_servers, auto_cw_cache, mitm_servers,
instance_software, mutuals_list) instance_software, mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
message_id = remove_id_ending(post_json_object['id']) message_id = remove_id_ending(post_json_object['id'])
# show the previous posts # show the previous posts
@ -3603,7 +3619,11 @@ def html_individual_post(recent_posts_cache: {}, max_recent_posts: int,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) + post_str mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr) + post_str
# show the following posts # show the following posts
post_filename = locate_post(base_dir, nickname, domain, message_id) post_filename = locate_post(base_dir, nickname, domain, message_id)
@ -3646,7 +3666,11 @@ def html_individual_post(recent_posts_cache: {}, max_recent_posts: int,
minimize_all_images, None, minimize_all_images, None,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, instance_software, mitm_servers, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
css_filename = base_dir + '/epicyon-profile.css' css_filename = base_dir + '/epicyon-profile.css'
if os.path.isfile(base_dir + '/epicyon.css'): if os.path.isfile(base_dir + '/epicyon.css'):
css_filename = base_dir + '/epicyon.css' css_filename = base_dir + '/epicyon.css'
@ -3701,7 +3725,11 @@ def html_post_replies(recent_posts_cache: {}, max_recent_posts: int,
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}, instance_software: {},
mutuals_list: []) -> str: mutuals_list: [],
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the replies to an individual post as html """Show the replies to an individual post as html
""" """
replies_str = '' replies_str = ''
@ -3736,7 +3764,11 @@ def html_post_replies(recent_posts_cache: {}, max_recent_posts: int,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
css_filename = base_dir + '/epicyon-profile.css' css_filename = base_dir + '/epicyon-profile.css'
if os.path.isfile(base_dir + '/epicyon.css'): if os.path.isfile(base_dir + '/epicyon.css'):
@ -3773,7 +3805,11 @@ def html_emoji_reaction_picker(recent_posts_cache: {}, max_recent_posts: int,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Returns the emoji picker screen """Returns the emoji picker screen
""" """
minimize_all_images = False minimize_all_images = False
@ -3805,7 +3841,11 @@ def html_emoji_reaction_picker(recent_posts_cache: {}, max_recent_posts: int,
bold_reading, dogwhistles, bold_reading, dogwhistles,
minimize_all_images, None, buy_sites, minimize_all_images, None, buy_sites,
auto_cw_cache, mitm_servers, auto_cw_cache, mitm_servers,
instance_software, mutuals_list) instance_software, mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
reactions_filename = base_dir + '/emoji/reactions.json' reactions_filename = base_dir + '/emoji/reactions.json'
if not os.path.isfile(reactions_filename): if not os.path.isfile(reactions_filename):

View File

@ -260,7 +260,11 @@ def html_profile_after_search(authorized: bool,
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
ua_str: str, ua_str: str,
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show a profile page after a search for a fediverse address """Show a profile page after a search for a fediverse address
""" """
http = False http = False
@ -655,7 +659,11 @@ def html_profile_after_search(authorized: bool,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
if not profile_post_html: if not profile_post_html:
if debug: if debug:
print('DEBUG: no html produced for profile post: ' + print('DEBUG: no html produced for profile post: ' +
@ -1115,7 +1123,11 @@ def html_profile(signing_priv_key_pem: str,
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}, instance_software: {},
hide_recent_posts: {}) -> str: hide_recent_posts: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the profile page as html """Show the profile page as html
""" """
show_moved_accounts = False show_moved_accounts = False
@ -1148,7 +1160,11 @@ def html_profile(signing_priv_key_pem: str,
min_images_for_accounts, buy_sites, min_images_for_accounts, buy_sites,
auto_cw_cache, auto_cw_cache,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, instance_software) mitm_servers, instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
domain, port = get_domain_from_actor(profile_json['id']) domain, port = get_domain_from_actor(profile_json['id'])
if not domain: if not domain:
@ -1760,7 +1776,11 @@ def html_profile(signing_priv_key_pem: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) + license_str mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr) + license_str
if not is_group: if not is_group:
if selected == 'following': if selected == 'following':
profile_str += \ profile_str += \
@ -1873,7 +1893,11 @@ def _html_profile_posts(recent_posts_cache: {}, max_recent_posts: int,
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}, instance_software: {},
mutuals_list: []) -> str: mutuals_list: [],
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Shows posts on the profile screen """Shows posts on the profile screen
These should only be public posts These should only be public posts
""" """
@ -1935,7 +1959,11 @@ def _html_profile_posts(recent_posts_cache: {}, max_recent_posts: int,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
if post_str and item_id not in shown_items: if post_str and item_id not in shown_items:
profile_str += post_str + separator_str profile_str += post_str + separator_str
shown_items.append(item_id) shown_items.append(item_id)

View File

@ -737,7 +737,11 @@ def html_history_search(translate: {}, base_dir: str,
buy_sites: {}, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show a page containing search results for your post history """Show a page containing search results for your post history
""" """
if historysearch.startswith("'"): if historysearch.startswith("'"):
@ -859,7 +863,11 @@ def html_history_search(translate: {}, base_dir: str,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
if post_str: if post_str:
history_search_form += separator_str + post_str history_search_form += separator_str + post_str
index += 1 index += 1
@ -891,7 +899,11 @@ def html_hashtag_search(nickname: str, domain: str, port: int,
buy_sites: {}, auto_cw_cache: {}, buy_sites: {}, auto_cw_cache: {},
ua_str: str, ua_str: str,
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show a page containing search results for a hashtag """Show a page containing search results for a hashtag
or after selecting a hashtag from the swarm or after selecting a hashtag from the swarm
""" """
@ -1095,7 +1107,11 @@ def html_hashtag_search(nickname: str, domain: str, port: int,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
if post_str: if post_str:
hashtag_search_form += \ hashtag_search_form += \
text_mode_separator + separator_str + post_str text_mode_separator + separator_str + post_str
@ -1141,7 +1157,11 @@ def html_hashtag_search_remote(nickname: str, domain: str, port: int,
debug: bool, buy_sites: {}, debug: bool, buy_sites: {},
auto_cw_cache: {}, auto_cw_cache: {},
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show a page containing search results for a remote hashtag """Show a page containing search results for a remote hashtag
""" """
hashtag = urllib.parse.unquote(hashtag_url.split('/')[-1]) hashtag = urllib.parse.unquote(hashtag_url.split('/')[-1])
@ -1309,7 +1329,11 @@ def html_hashtag_search_remote(nickname: str, domain: str, port: int,
buy_sites, auto_cw_cache, buy_sites, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
if post_str: if post_str:
hashtag_search_form += \ hashtag_search_form += \
text_mode_separator + separator_str + post_str text_mode_separator + separator_str + post_str

View File

@ -481,7 +481,11 @@ def html_timeline(default_timeline: str,
show_announces: bool, show_announces: bool,
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the timeline as html """Show the timeline as html
""" """
enable_timing_log = False enable_timing_log = False
@ -1103,7 +1107,11 @@ def html_timeline(default_timeline: str,
auto_cw_cache, auto_cw_cache,
mitm_servers, mitm_servers,
instance_software, instance_software,
mutuals_list) mutuals_list,
block_military,
block_government,
block_bluesky,
block_nostr)
_log_timeline_timing(enable_timing_log, _log_timeline_timing(enable_timing_log,
timeline_start_time, box_name, '12') timeline_start_time, box_name, '12')
@ -1389,7 +1397,11 @@ def html_shares(default_timeline: str,
auto_cw_cache: {}, auto_cw_cache: {},
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the shares timeline as html """Show the shares timeline as html
""" """
manually_approve_followers = \ manually_approve_followers = \
@ -1426,7 +1438,11 @@ def html_shares(default_timeline: str,
reverse_sequence, None, buy_sites, reverse_sequence, None, buy_sites,
auto_cw_cache, show_announces, auto_cw_cache, show_announces,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, instance_software) mitm_servers, instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_wanted(default_timeline: str, def html_wanted(default_timeline: str,
@ -1462,7 +1478,11 @@ def html_wanted(default_timeline: str,
auto_cw_cache: {}, auto_cw_cache: {},
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the wanted timeline as html """Show the wanted timeline as html
""" """
manually_approve_followers = \ manually_approve_followers = \
@ -1499,7 +1519,11 @@ def html_wanted(default_timeline: str,
reverse_sequence, None, buy_sites, reverse_sequence, None, buy_sites,
auto_cw_cache, show_announces, auto_cw_cache, show_announces,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, instance_software) mitm_servers, instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_inbox(default_timeline: str, def html_inbox(default_timeline: str,
@ -1538,7 +1562,11 @@ def html_inbox(default_timeline: str,
show_announces: bool, show_announces: bool,
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the inbox as html """Show the inbox as html
""" """
manually_approve_followers = \ manually_approve_followers = \
@ -1574,7 +1602,11 @@ def html_inbox(default_timeline: str,
reverse_sequence, last_post_id, reverse_sequence, last_post_id,
buy_sites, auto_cw_cache, show_announces, buy_sites, auto_cw_cache, show_announces,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, instance_software) mitm_servers, instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_bookmarks(default_timeline: str, def html_bookmarks(default_timeline: str,
@ -1611,7 +1643,11 @@ def html_bookmarks(default_timeline: str,
auto_cw_cache: {}, auto_cw_cache: {},
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the bookmarks as html """Show the bookmarks as html
""" """
manually_approve_followers = \ manually_approve_followers = \
@ -1647,7 +1683,11 @@ def html_bookmarks(default_timeline: str,
reverse_sequence, None, buy_sites, reverse_sequence, None, buy_sites,
auto_cw_cache, show_announces, auto_cw_cache, show_announces,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, instance_software) mitm_servers, instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_inbox_dms(default_timeline: str, def html_inbox_dms(default_timeline: str,
@ -1685,7 +1725,11 @@ def html_inbox_dms(default_timeline: str,
auto_cw_cache: {}, auto_cw_cache: {},
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the DM timeline as html """Show the DM timeline as html
""" """
artist = is_artist(base_dir, nickname) artist = is_artist(base_dir, nickname)
@ -1717,7 +1761,11 @@ def html_inbox_dms(default_timeline: str,
reverse_sequence, last_post_id, reverse_sequence, last_post_id,
buy_sites, auto_cw_cache, show_announces, buy_sites, auto_cw_cache, show_announces,
known_epicyon_instances, known_epicyon_instances,
mitm_servers, instance_software) mitm_servers, instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_inbox_replies(default_timeline: str, def html_inbox_replies(default_timeline: str,
@ -1755,7 +1803,11 @@ def html_inbox_replies(default_timeline: str,
auto_cw_cache: {}, auto_cw_cache: {},
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the replies timeline as html """Show the replies timeline as html
""" """
artist = is_artist(base_dir, nickname) artist = is_artist(base_dir, nickname)
@ -1785,7 +1837,11 @@ def html_inbox_replies(default_timeline: str,
reverse_sequence, last_post_id, buy_sites, reverse_sequence, last_post_id, buy_sites,
auto_cw_cache, show_announces, auto_cw_cache, show_announces,
known_epicyon_instances, mitm_servers, known_epicyon_instances, mitm_servers,
instance_software) instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_inbox_media(default_timeline: str, def html_inbox_media(default_timeline: str,
@ -1824,7 +1880,11 @@ def html_inbox_media(default_timeline: str,
show_announces: bool, show_announces: bool,
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the media timeline as html """Show the media timeline as html
""" """
artist = is_artist(base_dir, nickname) artist = is_artist(base_dir, nickname)
@ -1853,7 +1913,11 @@ def html_inbox_media(default_timeline: str,
reverse_sequence, last_post_id, buy_sites, reverse_sequence, last_post_id, buy_sites,
auto_cw_cache, show_announces, auto_cw_cache, show_announces,
known_epicyon_instances, mitm_servers, known_epicyon_instances, mitm_servers,
instance_software) instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_inbox_blogs(default_timeline: str, def html_inbox_blogs(default_timeline: str,
@ -1891,7 +1955,11 @@ def html_inbox_blogs(default_timeline: str,
auto_cw_cache: {}, auto_cw_cache: {},
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the blogs timeline as html """Show the blogs timeline as html
""" """
artist = is_artist(base_dir, nickname) artist = is_artist(base_dir, nickname)
@ -1921,7 +1989,11 @@ def html_inbox_blogs(default_timeline: str,
reverse_sequence, last_post_id, buy_sites, reverse_sequence, last_post_id, buy_sites,
auto_cw_cache, show_announces, auto_cw_cache, show_announces,
known_epicyon_instances, mitm_servers, known_epicyon_instances, mitm_servers,
instance_software) instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_inbox_features(default_timeline: str, def html_inbox_features(default_timeline: str,
@ -1959,7 +2031,11 @@ def html_inbox_features(default_timeline: str,
auto_cw_cache: {}, auto_cw_cache: {},
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the features timeline as html """Show the features timeline as html
""" """
show_announces = True show_announces = True
@ -1988,7 +2064,11 @@ def html_inbox_features(default_timeline: str,
reverse_sequence, None, buy_sites, reverse_sequence, None, buy_sites,
auto_cw_cache, show_announces, auto_cw_cache, show_announces,
known_epicyon_instances, mitm_servers, known_epicyon_instances, mitm_servers,
instance_software) instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_inbox_news(default_timeline: str, def html_inbox_news(default_timeline: str,
@ -2025,7 +2105,11 @@ def html_inbox_news(default_timeline: str,
auto_cw_cache: {}, auto_cw_cache: {},
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the news timeline as html """Show the news timeline as html
""" """
show_announces = True show_announces = True
@ -2054,7 +2138,11 @@ def html_inbox_news(default_timeline: str,
reverse_sequence, None, buy_sites, reverse_sequence, None, buy_sites,
auto_cw_cache, show_announces, auto_cw_cache, show_announces,
known_epicyon_instances, mitm_servers, known_epicyon_instances, mitm_servers,
instance_software) instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)
def html_outbox(default_timeline: str, def html_outbox(default_timeline: str,
@ -2092,7 +2180,11 @@ def html_outbox(default_timeline: str,
show_announces: bool, show_announces: bool,
known_epicyon_instances: [], known_epicyon_instances: [],
mitm_servers: [], mitm_servers: [],
instance_software: {}) -> str: instance_software: {},
block_military: {},
block_government: {},
block_bluesky: {},
block_nostr: {}) -> str:
"""Show the Outbox as html """Show the Outbox as html
""" """
manually_approve_followers = \ manually_approve_followers = \
@ -2122,4 +2214,8 @@ def html_outbox(default_timeline: str,
dogwhistles, ua_str, min_images_for_accounts, dogwhistles, ua_str, min_images_for_accounts,
reverse_sequence, None, buy_sites, auto_cw_cache, reverse_sequence, None, buy_sites, auto_cw_cache,
show_announces, known_epicyon_instances, show_announces, known_epicyon_instances,
mitm_servers, instance_software) mitm_servers, instance_software,
block_military,
block_government,
block_bluesky,
block_nostr)