Store the follower handle

master
Bob Mottram 2019-07-20 14:35:58 +01:00
parent f2d5e1e05f
commit f13751603d
1 changed files with 4 additions and 2 deletions

View File

@ -264,6 +264,7 @@ def followApprovalRequired(baseDir: str,nicknameToFollow: str, \
def storeFollowRequest(baseDir: str, \ def storeFollowRequest(baseDir: str, \
nicknameToFollow: str,domainToFollow: str,port: int, \ nicknameToFollow: str,domainToFollow: str,port: int, \
nickname: str,domain: str,fromPort: int, \
followJson: {}, \ followJson: {}, \
debug: bool) -> bool: debug: bool) -> bool:
"""Stores the follow request for later use """Stores the follow request for later use
@ -273,9 +274,9 @@ def storeFollowRequest(baseDir: str, \
return False return False
if port!=80 and port!=443: if port!=80 and port!=443:
approveHandle=nicknameToFollow+'@'+domainToFollow+':'+str(port) approveHandle=nickname+'@'+domain+':'+str(fromPort)
else: else:
approveHandle=nicknameToFollow+'@'+domainToFollow approveHandle=nickname+'@'+domain
# add to a file which contains a list of requests # add to a file which contains a list of requests
approveFollowsFilename=accountDir+'/followrequests.txt' approveFollowsFilename=accountDir+'/followrequests.txt'
@ -375,6 +376,7 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \
domainToFollow,debug): domainToFollow,debug):
return storeFollowRequest(baseDir, \ return storeFollowRequest(baseDir, \
nicknameToFollow,domainToFollow,port, \ nicknameToFollow,domainToFollow,port, \
nickname,domain,fromPort,
messageJson,debug) messageJson,debug)
return followedAccountAccepts(session,baseDir,httpPrefix, \ return followedAccountAccepts(session,baseDir,httpPrefix, \