Change actor flag for hideFollows

main
Bob Mottram 2023-12-24 17:14:17 +00:00
parent 1e3a15390e
commit 85f03e69c4
1 changed files with 4 additions and 0 deletions

View File

@ -8061,6 +8061,8 @@ class PubServer(BaseHTTPRequestHandler):
if fields['hideFollows'] == 'on':
hide_follows = True
self.server.hide_follows[nickname] = True
actor_json['hideFollows'] = True
actor_changed = True
try:
with open(hide_follows_filename, 'w+',
encoding='utf-8') as rfile:
@ -8069,8 +8071,10 @@ class PubServer(BaseHTTPRequestHandler):
print('EX: unable to write hideFollows ' +
hide_follows_filename)
if not hide_follows:
actor_json['hideFollows'] = False
if self.server.hide_follows.get(nickname):
del self.server.hide_follows[nickname]
actor_changed = True
if os.path.isfile(hide_follows_filename):
try:
os.remove(hide_follows_filename)