mirror of https://gitlab.com/bashrc2/epicyon
Info button on profile search
parent
4e9535a52d
commit
cce73d6d0b
29
daemon.py
29
daemon.py
|
@ -4080,6 +4080,35 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.server.postreq_busy = False
|
||||
return
|
||||
|
||||
if '&submitInfo=' in follow_confirm_params:
|
||||
following_actor = \
|
||||
urllib.parse.unquote_plus(follow_confirm_params)
|
||||
following_actor = following_actor.split('actor=')[1]
|
||||
if '&' in following_actor:
|
||||
following_actor = following_actor.split('&')[0]
|
||||
if is_moderator(base_dir, follower_nickname):
|
||||
msg = \
|
||||
html_account_info(self.server.translate,
|
||||
base_dir, http_prefix,
|
||||
follower_nickname,
|
||||
self.server.domain,
|
||||
self.server.port,
|
||||
following_actor,
|
||||
self.server.debug,
|
||||
self.server.system_language,
|
||||
self.server.signing_priv_key_pem)
|
||||
if msg:
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
self._login_headers('text/html',
|
||||
msglen, calling_domain)
|
||||
self._write(msg)
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
self._redirect_headers(following_actor, cookie, calling_domain)
|
||||
self.server.postreq_busy = False
|
||||
return
|
||||
|
||||
if '&submitYes=' in follow_confirm_params:
|
||||
following_actor = \
|
||||
urllib.parse.unquote_plus(follow_confirm_params)
|
||||
|
|
|
@ -364,9 +364,6 @@ def html_profile_after_search(recent_posts_cache: {}, max_recent_posts: int,
|
|||
person_url + '">\n'
|
||||
if not is_following_actor(base_dir, nickname, domain, person_url):
|
||||
if is_moderator(base_dir, nickname):
|
||||
search_handle = search_nickname + '@' + search_domain_full
|
||||
profile_str += ' <input type="hidden" ' + \
|
||||
'name="moderationAction" value="' + search_handle + '">\n'
|
||||
profile_str += \
|
||||
' <button type="submit" class="button" ' + \
|
||||
'name="submitInfo" ' + \
|
||||
|
|
Loading…
Reference in New Issue