mirror of https://gitlab.com/bashrc2/epicyon
Also list followers
parent
297f25f92c
commit
5d2b7c40f9
26
daemon.py
26
daemon.py
|
@ -16393,6 +16393,32 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'_GET', 'following accounts done',
|
'_GET', 'following accounts done',
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
|
|
||||||
|
# show a list of who are your followers
|
||||||
|
if html_getreq and authorized and users_in_path and \
|
||||||
|
self.path.endswith('/followersaccounts'):
|
||||||
|
nickname = get_nickname_from_actor(self.path)
|
||||||
|
if not nickname:
|
||||||
|
self._404()
|
||||||
|
return
|
||||||
|
followers_filename = \
|
||||||
|
acct_dir(self.server.base_dir,
|
||||||
|
nickname, self.server.domain) + '/followers.txt'
|
||||||
|
if not os.path.isfile(followers_filename):
|
||||||
|
self._404()
|
||||||
|
return
|
||||||
|
msg = html_following_list(self.server.base_dir, followers_filename)
|
||||||
|
msglen = len(msg)
|
||||||
|
self._login_headers('text/html', msglen, calling_domain)
|
||||||
|
self._write(msg.encode('utf-8'))
|
||||||
|
fitness_performance(getreq_start_time, self.server.fitness,
|
||||||
|
'_GET', 'followers accounts shown',
|
||||||
|
self.server.debug)
|
||||||
|
return
|
||||||
|
|
||||||
|
fitness_performance(getreq_start_time, self.server.fitness,
|
||||||
|
'_GET', 'followers accounts done',
|
||||||
|
self.server.debug)
|
||||||
|
|
||||||
if self.path.endswith('/about'):
|
if self.path.endswith('/about'):
|
||||||
if calling_domain.endswith('.onion'):
|
if calling_domain.endswith('.onion'):
|
||||||
msg = \
|
msg = \
|
||||||
|
|
|
@ -1998,7 +1998,11 @@ def _html_edit_profile_contact_info(nickname: str,
|
||||||
edit_profile_form += \
|
edit_profile_form += \
|
||||||
'<a href="/users/' + nickname + \
|
'<a href="/users/' + nickname + \
|
||||||
'/followingaccounts"><label class="labels">' + \
|
'/followingaccounts"><label class="labels">' + \
|
||||||
translate['Following'] + '</label></a><br>\n'
|
translate['Following'] + '</label></a> '
|
||||||
|
edit_profile_form += \
|
||||||
|
'<a href="/users/' + nickname + \
|
||||||
|
'/followersaccounts"><label class="labels">' + \
|
||||||
|
translate['Followers'] + '</label></a><br>\n'
|
||||||
|
|
||||||
edit_profile_form += end_edit_section()
|
edit_profile_form += end_edit_section()
|
||||||
return edit_profile_form
|
return edit_profile_form
|
||||||
|
|
Loading…
Reference in New Issue