From 87604e6d77b96cfb9048f31bad60c9afaba0c745 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 23 Oct 2020 20:55:03 +0100 Subject: [PATCH] Missing parameter --- daemon.py | 3 ++- follow.py | 5 +++-- tests.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/daemon.py b/daemon.py index 5161c267f..caa6db0cf 100644 --- a/daemon.py +++ b/daemon.py @@ -2056,7 +2056,8 @@ class PubServer(BaseHTTPRequestHandler): self.server.cachedWebfingers, self.server.personCache, debug, - self.server.projectVersion) + self.server.projectVersion, + self.server.allowNewsFollowers) if callingDomain.endswith('.onion') and onionDomain: originPathStr = 'http://' + onionDomain + usersPath elif (callingDomain.endswith('.i2p') and i2pDomain): diff --git a/follow.py b/follow.py index 36d815d0c..5636c07af 100644 --- a/follow.py +++ b/follow.py @@ -808,7 +808,7 @@ def sendFollowRequest(session, baseDir: str, clientToServer: bool, federationList: [], sendThreads: [], postLog: [], cachedWebfingers: {}, personCache: {}, debug: bool, - projectVersion: str) -> {}: + projectVersion: str, allowNewsFollowers: bool) -> {}: """Gets the json object for sending a follow request """ if not domainPermitted(followDomain, federationList): @@ -850,7 +850,8 @@ def sendFollowRequest(session, baseDir: str, 'object': followedId } - if followApprovalRequired(baseDir, nickname, domain, debug, followHandle): + if followApprovalRequired(baseDir, nickname, domain, debug, + followHandle, allowNewsFollowers): # Remove any follow requests rejected for the account being followed. # It's assumed that if you are following someone then you are # ok with them following back. If this isn't the case then a rejected diff --git a/tests.py b/tests.py index 8450d2f9d..3aab23de8 100644 --- a/tests.py +++ b/tests.py @@ -758,7 +758,7 @@ def testFollowBetweenServers(): clientToServer, federationList, aliceSendThreads, alicePostLog, aliceCachedWebfingers, alicePersonCache, - True, __version__) + True, __version__, False) print('sendResult: ' + str(sendResult)) for t in range(10):