mirror of https://gitlab.com/bashrc2/epicyon
Comments
parent
14bb236937
commit
8c6a8004a9
|
|
@ -807,18 +807,22 @@ def _profile_post_block_military(nickname: str, fields: {}, self) -> None:
|
||||||
|
|
||||||
def _profile_post_hide_follows(base_dir: str, nickname: str, domain: str,
|
def _profile_post_hide_follows(base_dir: str, nickname: str, domain: str,
|
||||||
actor_json: {}, fields: {}, self,
|
actor_json: {}, fields: {}, self,
|
||||||
actor_changed: bool) -> bool:
|
actor_changed: bool,
|
||||||
|
premium: bool) -> bool:
|
||||||
""" HTTP POST hide follows checkbox
|
""" HTTP POST hide follows checkbox
|
||||||
|
This hides follows from unauthorized viewers
|
||||||
"""
|
"""
|
||||||
hide_follows_filename = \
|
hide_follows_filename = \
|
||||||
acct_dir(base_dir, nickname, domain) + '/.hideFollows'
|
acct_dir(base_dir, nickname, domain) + '/.hideFollows'
|
||||||
hide_follows = False
|
hide_follows = premium
|
||||||
if fields.get('hideFollows'):
|
if fields.get('hideFollows'):
|
||||||
if fields['hideFollows'] == 'on':
|
if fields['hideFollows'] == 'on':
|
||||||
hide_follows = True
|
hide_follows = True
|
||||||
self.server.hide_follows[nickname] = True
|
if hide_follows:
|
||||||
actor_json['hideFollows'] = True
|
self.server.hide_follows[nickname] = True
|
||||||
actor_changed = True
|
actor_json['hideFollows'] = True
|
||||||
|
actor_changed = True
|
||||||
|
if not os.path.isfile(hide_follows_filename):
|
||||||
try:
|
try:
|
||||||
with open(hide_follows_filename, 'w+',
|
with open(hide_follows_filename, 'w+',
|
||||||
encoding='utf-8') as rfile:
|
encoding='utf-8') as rfile:
|
||||||
|
|
@ -2917,7 +2921,7 @@ def profile_edit(self, calling_domain: str, cookie: str,
|
||||||
actor_changed = \
|
actor_changed = \
|
||||||
_profile_post_hide_follows(base_dir, nickname, domain,
|
_profile_post_hide_follows(base_dir, nickname, domain,
|
||||||
actor_json, fields, self,
|
actor_json, fields, self,
|
||||||
actor_changed)
|
actor_changed, premium)
|
||||||
_profile_post_block_military(nickname, fields, self)
|
_profile_post_block_military(nickname, fields, self)
|
||||||
|
|
||||||
notify_likes_filename = \
|
notify_likes_filename = \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue