From 2dcf6a9af17c3e0332e5252402372538bcf0534c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 18 Sep 2019 20:01:07 +0100 Subject: [PATCH] Don't store follow request if it has already been denied --- follow.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/follow.py b/follow.py index 27523a40..d1ea38e7 100644 --- a/follow.py +++ b/follow.py @@ -357,6 +357,12 @@ def storeFollowRequest(baseDir: str, \ ' already following '+approveHandle) return True + # should this follow be denied? + denyFollowsFilename=accountsDir+'/followrejects.txt' + if os.path.isfile(denyFollowsFilename): + if approveHandle not in open(denyFollowsFilename).read(): + return True + # add to a file which contains a list of requests approveFollowsFilename=accountsDir+'/followrequests.txt' if os.path.isfile(approveFollowsFilename):