mirror of https://gitlab.com/bashrc2/epicyon
Merge branch 'bashrc2:main' into infra-provisioning
commit
b93ec08aa3
|
@ -12282,7 +12282,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.access_keys,
|
self.server.access_keys,
|
||||||
self.server.min_images_for_accounts,
|
self.server.min_images_for_accounts,
|
||||||
self.server.debug,
|
self.server.debug,
|
||||||
self.server.buy_sites)
|
self.server.buy_sites,
|
||||||
|
self.server.blocked_cache)
|
||||||
if conv_str:
|
if conv_str:
|
||||||
msg = conv_str.encode('utf-8')
|
msg = conv_str.encode('utf-8')
|
||||||
msglen = len(msg)
|
msglen = len(msg)
|
||||||
|
|
|
@ -11,6 +11,9 @@ __module_group__ = "Timeline"
|
||||||
import os
|
import os
|
||||||
from conversation import download_conversation_posts
|
from conversation import download_conversation_posts
|
||||||
from utils import get_config_param
|
from utils import get_config_param
|
||||||
|
from utils import get_nickname_from_actor
|
||||||
|
from utils import get_domain_from_actor
|
||||||
|
from blocking import is_blocked
|
||||||
from webapp_utils import html_header_with_external_style
|
from webapp_utils import html_header_with_external_style
|
||||||
from webapp_utils import html_post_separator
|
from webapp_utils import html_post_separator
|
||||||
from webapp_utils import html_footer
|
from webapp_utils import html_footer
|
||||||
|
@ -42,7 +45,8 @@ def html_conversation_view(post_id: str,
|
||||||
timezone: str, bold_reading: bool,
|
timezone: str, bold_reading: bool,
|
||||||
dogwhistles: {}, access_keys: {},
|
dogwhistles: {}, access_keys: {},
|
||||||
min_images_for_accounts: [],
|
min_images_for_accounts: [],
|
||||||
debug: bool, buy_sites: {}) -> str:
|
debug: bool, buy_sites: {},
|
||||||
|
blocked_cache: []) -> str:
|
||||||
"""Show a page containing a conversation thread
|
"""Show a page containing a conversation thread
|
||||||
"""
|
"""
|
||||||
conv_posts = \
|
conv_posts = \
|
||||||
|
@ -69,6 +73,15 @@ def html_conversation_view(post_id: str,
|
||||||
if nickname in min_images_for_accounts:
|
if nickname in min_images_for_accounts:
|
||||||
minimize_all_images = True
|
minimize_all_images = True
|
||||||
for post_json_object in conv_posts:
|
for post_json_object in conv_posts:
|
||||||
|
show_individual_post_icons = True
|
||||||
|
from_actor = post_json_object['object']['attributedTo']
|
||||||
|
from_nickname = get_nickname_from_actor(from_actor)
|
||||||
|
from_domain, _ = get_domain_from_actor(from_actor)
|
||||||
|
# don't show icons on posts from blocked accounts/instances
|
||||||
|
if from_nickname and from_domain:
|
||||||
|
if is_blocked(base_dir, nickname, domain,
|
||||||
|
from_nickname, from_domain,
|
||||||
|
blocked_cache):
|
||||||
show_individual_post_icons = False
|
show_individual_post_icons = False
|
||||||
allow_deletion = False
|
allow_deletion = False
|
||||||
post_str = \
|
post_str = \
|
||||||
|
|
|
@ -8,6 +8,7 @@ __status__ = "Production"
|
||||||
__module_group__ = "Web Interface"
|
__module_group__ = "Web Interface"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import urllib.parse
|
||||||
from question import is_question
|
from question import is_question
|
||||||
from utils import remove_id_ending
|
from utils import remove_id_ending
|
||||||
from utils import acct_dir
|
from utils import acct_dir
|
||||||
|
@ -52,9 +53,10 @@ def insert_question(base_dir: str, translate: {},
|
||||||
continue
|
continue
|
||||||
if not choice.get('name'):
|
if not choice.get('name'):
|
||||||
continue
|
continue
|
||||||
|
quoted_name = urllib.parse.quote_plus(choice['name'])
|
||||||
content += \
|
content += \
|
||||||
'<input type="radio" name="answer" value="' + \
|
'<input type="radio" name="answer" value="' + \
|
||||||
choice['name'] + '" tabindex="10"> ' + \
|
quoted_name + '" tabindex="10"> ' + \
|
||||||
choice['name'] + '<br><br>\n'
|
choice['name'] + '<br><br>\n'
|
||||||
content += \
|
content += \
|
||||||
'<input type="submit" value="' + \
|
'<input type="submit" value="' + \
|
||||||
|
|
Loading…
Reference in New Issue