Merge branch 'main' of gitlab.com:bashrc2/epicyon

merge-requests/30/head
Bob Mottram 2022-02-10 15:12:24 +00:00
commit 867aa50ee6
2 changed files with 6 additions and 3 deletions

View File

@ -1367,7 +1367,9 @@ def get_followers_of_actor(base_dir: str, actor: str, debug: bool) -> {}:
# for each of the accounts # for each of the accounts
for subdir, dirs, _ in os.walk(base_dir + '/accounts'): for subdir, dirs, _ in os.walk(base_dir + '/accounts'):
for account in dirs: for account in dirs:
if '@' in account and not account.startswith('inbox@'): if '@' in account and \
not account.startswith('inbox@') and \
not account.startswith('Actor@'):
following_filename = \ following_filename = \
os.path.join(subdir, account) + '/following.txt' os.path.join(subdir, account) + '/following.txt'
if debug: if debug:

View File

@ -605,6 +605,7 @@ def get_followers_of_person(base_dir: str,
filename = os.path.join(subdir, account) + '/' + follow_file filename = os.path.join(subdir, account) + '/' + follow_file
if account == handle or \ if account == handle or \
account.startswith('inbox@') or \ account.startswith('inbox@') or \
account.startswith('Actor@') or \
account.startswith('news@'): account.startswith('news@'):
continue continue
if not os.path.isfile(filename): if not os.path.isfile(filename):
@ -1336,7 +1337,7 @@ def clear_from_post_caches(base_dir: str, recent_posts_cache: {},
for acct in dirs: for acct in dirs:
if '@' not in acct: if '@' not in acct:
continue continue
if acct.startswith('inbox@'): if acct.startswith('inbox@') or acct.startswith('Actor@'):
continue continue
cache_dir = os.path.join(base_dir + '/accounts', acct) cache_dir = os.path.join(base_dir + '/accounts', acct)
post_filename = cache_dir + filename post_filename = cache_dir + filename
@ -2893,7 +2894,7 @@ def is_account_dir(dir_name: str) -> bool:
""" """
if '@' not in dir_name: if '@' not in dir_name:
return False return False
if 'inbox@' in dir_name or 'news@' in dir_name: if 'inbox@' in dir_name or 'news@' in dir_name or 'Actor@' in dir_name:
return False return False
return True return True