mirror of https://gitlab.com/bashrc2/epicyon
Include both following and follower domains within broch
parent
6b55ceab12
commit
f4fdedba87
|
@ -380,6 +380,7 @@ def setBrochMode(baseDir: str, domainFull: str, enabled: bool) -> None:
|
||||||
else:
|
else:
|
||||||
# generate instance allow list
|
# generate instance allow list
|
||||||
allowedDomains = [domainFull]
|
allowedDomains = [domainFull]
|
||||||
|
followFiles = ('following.txt', 'followers.txt')
|
||||||
for subdir, dirs, files in os.walk(baseDir + '/accounts'):
|
for subdir, dirs, files in os.walk(baseDir + '/accounts'):
|
||||||
for acct in dirs:
|
for acct in dirs:
|
||||||
if '@' not in acct:
|
if '@' not in acct:
|
||||||
|
@ -387,7 +388,8 @@ def setBrochMode(baseDir: str, domainFull: str, enabled: bool) -> None:
|
||||||
if 'inbox@' in acct or 'news@' in acct:
|
if 'inbox@' in acct or 'news@' in acct:
|
||||||
continue
|
continue
|
||||||
accountDir = os.path.join(baseDir + '/accounts', acct)
|
accountDir = os.path.join(baseDir + '/accounts', acct)
|
||||||
followingFilename = accountDir + '/following.txt'
|
for followFileType in followFiles:
|
||||||
|
followingFilename = accountDir + '/' + followFileType
|
||||||
if not os.path.isfile(followingFilename):
|
if not os.path.isfile(followingFilename):
|
||||||
continue
|
continue
|
||||||
with open(followingFilename, "r") as f:
|
with open(followingFilename, "r") as f:
|
||||||
|
|
Loading…
Reference in New Issue