forked from indymedia/epicyon
Tidying
parent
825fb76066
commit
32477e867b
17
follow.py
17
follow.py
|
@ -535,10 +535,7 @@ def storeFollowRequest(baseDir: str,
|
||||||
|
|
||||||
approveHandle = nickname + '@' + domain
|
approveHandle = nickname + '@' + domain
|
||||||
domainFull = getFullDomain(domain, fromPort)
|
domainFull = getFullDomain(domain, fromPort)
|
||||||
if fromPort:
|
approveHandle = getFullDomain(nickname + '@' + domain, fromPort)
|
||||||
if fromPort != 80 and fromPort != 443:
|
|
||||||
if ':' not in domain:
|
|
||||||
approveHandle = nickname + '@' + domain + ':' + str(fromPort)
|
|
||||||
|
|
||||||
followersFilename = accountsDir + '/followers.txt'
|
followersFilename = accountsDir + '/followers.txt'
|
||||||
if os.path.isfile(followersFilename):
|
if os.path.isfile(followersFilename):
|
||||||
|
@ -628,12 +625,9 @@ def receiveFollowRequest(session, baseDir: str, httpPrefix: str,
|
||||||
return False
|
return False
|
||||||
domain, tempPort = getDomainFromActor(messageJson['actor'])
|
domain, tempPort = getDomainFromActor(messageJson['actor'])
|
||||||
fromPort = port
|
fromPort = port
|
||||||
domainFull = domain
|
domainFull = getFullDomain(domain, tempPort)
|
||||||
if tempPort:
|
if tempPort:
|
||||||
fromPort = tempPort
|
fromPort = tempPort
|
||||||
if tempPort != 80 and tempPort != 443:
|
|
||||||
if ':' not in domain:
|
|
||||||
domainFull = domain + ':' + str(tempPort)
|
|
||||||
if not domainPermitted(domain, federationList):
|
if not domainPermitted(domain, federationList):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: follower from domain not permitted - ' + domain)
|
print('DEBUG: follower from domain not permitted - ' + domain)
|
||||||
|
@ -901,12 +895,7 @@ def sendFollowRequest(session, baseDir: str,
|
||||||
return None
|
return None
|
||||||
|
|
||||||
fullDomain = getFullDomain(domain, port)
|
fullDomain = getFullDomain(domain, port)
|
||||||
followActor = httpPrefix + '://' + domain + '/users/' + nickname
|
followActor = httpPrefix + '://' + fullDomain + '/users/' + nickname
|
||||||
if port:
|
|
||||||
if port != 80 and port != 443:
|
|
||||||
if ':' not in domain:
|
|
||||||
followActor = httpPrefix + '://' + \
|
|
||||||
fullDomain + '/users/' + nickname
|
|
||||||
|
|
||||||
requestDomain = getFullDomain(followDomain, followPort)
|
requestDomain = getFullDomain(followDomain, followPort)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue