From 91a66a69723d5782991c5c7e335fb1a966195752 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 26 Aug 2019 19:41:35 +0100 Subject: [PATCH] Return true to prevent further follow attempts --- follow.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/follow.py b/follow.py index 0a7f5177..1ad8c1f8 100644 --- a/follow.py +++ b/follow.py @@ -380,7 +380,7 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \ if not domainPermitted(domainToFollow,federationList): if debug: print('DEBUG: follow domain not permitted '+domainToFollow) - return False + return True domainToFollowFull=domainToFollow if tempPort: if tempPort!=80 and tempPort!=443: @@ -390,14 +390,14 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \ if not nicknameToFollow: if debug: print('DEBUG: follow request does not contain a nickname for the account followed') - return False + return True handleToFollow=nicknameToFollow+'@'+domainToFollow if domainToFollow==domain: if not os.path.isdir(baseDir+'/accounts/'+handleToFollow): if debug: print('DEBUG: followed account not found - '+ \ baseDir+'/accounts/'+handleToFollow) - return False + return True if not followerOfPerson(baseDir,nicknameToFollow,domainToFollowFull, \ nickname,domainFull,federationList,debug): @@ -405,7 +405,7 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \ print('DEBUG: '+nickname+'@'+domain+ \ ' is already a follower of '+ \ nicknameToFollow+'@'+domainToFollow) - return False + return True # what is the followers policy? if followApprovalRequired(baseDir,nicknameToFollow, \