mirror of https://gitlab.com/bashrc2/epicyon
main
commit
fabf967085
17
daemon.py
17
daemon.py
|
@ -2671,7 +2671,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
search_handle,
|
||||
self.server.debug,
|
||||
self.server.system_language,
|
||||
self.server.signing_priv_key_pem)
|
||||
self.server.signing_priv_key_pem,
|
||||
None)
|
||||
else:
|
||||
msg = \
|
||||
html_moderation_info(self.server.translate,
|
||||
|
@ -3778,7 +3779,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
options_actor,
|
||||
self.server.debug,
|
||||
self.server.system_language,
|
||||
signing_priv_key_pem)
|
||||
signing_priv_key_pem,
|
||||
None)
|
||||
if msg:
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -4096,7 +4098,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
following_actor,
|
||||
self.server.debug,
|
||||
self.server.system_language,
|
||||
self.server.signing_priv_key_pem)
|
||||
self.server.signing_priv_key_pem,
|
||||
users_path)
|
||||
if msg:
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -16421,7 +16424,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if not can_reply_to(base_dir, nickname, domain,
|
||||
in_reply_to_url, reply_interval_hours):
|
||||
print('Reply outside of time window ' + in_reply_to_url +
|
||||
str(reply_interval_hours) + ' hours')
|
||||
' ' + str(reply_interval_hours) + ' hours')
|
||||
self._403()
|
||||
return True
|
||||
if self.server.debug:
|
||||
|
@ -20151,7 +20154,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
search_handle,
|
||||
self.server.debug,
|
||||
self.server.system_language,
|
||||
self.server.signing_priv_key_pem)
|
||||
self.server.signing_priv_key_pem,
|
||||
None)
|
||||
if msg:
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
@ -20188,7 +20192,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
search_handle,
|
||||
self.server.debug,
|
||||
self.server.system_language,
|
||||
self.server.signing_priv_key_pem)
|
||||
self.server.signing_priv_key_pem,
|
||||
None)
|
||||
if msg:
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
|
|
3
utils.py
3
utils.py
|
@ -1754,7 +1754,8 @@ def can_reply_to(base_dir: str, nickname: str, domain: str,
|
|||
if not post_json_object:
|
||||
post_filename = locate_post(base_dir, nickname, domain, post_url)
|
||||
if not post_filename:
|
||||
return False
|
||||
# the post is not stored locally
|
||||
return True
|
||||
post_json_object = load_json(post_filename)
|
||||
if not post_json_object:
|
||||
return False
|
||||
|
|
|
@ -97,7 +97,8 @@ def html_account_info(translate: {},
|
|||
base_dir: str, http_prefix: str,
|
||||
nickname: str, domain: str, port: int,
|
||||
search_handle: str, debug: bool,
|
||||
system_language: str, signing_priv_key_pem: str) -> str:
|
||||
system_language: str, signing_priv_key_pem: str,
|
||||
back_url: str) -> str:
|
||||
"""Shows which domains a search handle interacts with.
|
||||
This screen is shown if a moderator enters a handle and selects info
|
||||
on the moderation screen
|
||||
|
@ -125,8 +126,10 @@ def html_account_info(translate: {},
|
|||
search_handle = search_nickname + '@' + search_domain
|
||||
search_actor = \
|
||||
local_actor_url(http_prefix, search_nickname, search_domain)
|
||||
if not back_url:
|
||||
back_url = '/users/' + nickname + '/moderation'
|
||||
info_form += \
|
||||
'<center><h1><a href="/users/' + nickname + '/moderation">' + \
|
||||
'<center><h1><a href="' + back_url + '">' + \
|
||||
translate['Account Information'] + ':</a> <a href="' + search_actor + \
|
||||
'">' + search_handle + '</a></h1><br>\n'
|
||||
|
||||
|
|
Loading…
Reference in New Issue