Move function to follow send

main2
Bob Mottram 2019-10-06 11:34:40 +01:00
parent 36ffe273be
commit 42a1b4882e
1 changed files with 8 additions and 8 deletions

View File

@ -538,14 +538,6 @@ def followedAccountAccepts(session,baseDir: str,httpPrefix: str, \
""" """
acceptHandle=nickname+'@'+domain acceptHandle=nickname+'@'+domain
# 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
# follow request will block them again.
removeFromFollowRejects(baseDir, \
nicknameToFollow,domainToFollow, \
acceptHandle)
# send accept back # send accept back
if debug: if debug:
print('DEBUG: sending Accept activity for follow request which arrived at '+ \ print('DEBUG: sending Accept activity for follow request which arrived at '+ \
@ -645,6 +637,14 @@ def sendFollowRequest(session,baseDir: str, \
'object': followedId 'object': followedId
} }
# 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
# follow request will block them again.
removeFromFollowRejects(baseDir, \
nickname,domain, \
followNickname+'@'+requestDomain)
sendSignedJson(newFollowJson,session,baseDir,nickname,domain,port, \ sendSignedJson(newFollowJson,session,baseDir,nickname,domain,port, \
followNickname,followDomain,followPort, \ followNickname,followDomain,followPort, \
'https://www.w3.org/ns/activitystreams#Public', \ 'https://www.w3.org/ns/activitystreams#Public', \