forked from indymedia/epicyon
Following single user instances
parent
6da5c21edb
commit
db621abb6f
14
follow.py
14
follow.py
|
@ -626,7 +626,7 @@ def sendFollowRequest(session,baseDir: str, \
|
|||
"""
|
||||
if not domainPermitted(followDomain,federationList):
|
||||
return None
|
||||
|
||||
|
||||
fullDomain=domain
|
||||
followActor=httpPrefix+'://'+domain+'/users/'+nickname
|
||||
if port:
|
||||
|
@ -643,7 +643,15 @@ def sendFollowRequest(session,baseDir: str, \
|
|||
|
||||
statusNumber,published = getStatusNumber()
|
||||
|
||||
followedId=followHttpPrefix+'://'+requestDomain+'/users/'+followNickname
|
||||
if followNickname:
|
||||
followedId=followHttpPrefix+'://'+requestDomain+'/users/'+followNickname
|
||||
followHandle=followNickname+'@'+requestDomain
|
||||
else:
|
||||
if debug:
|
||||
print('DEBUG: sendFollowRequest - assuming single user instance')
|
||||
followedId=followHttpPrefix+'://'+requestDomain
|
||||
singleUserNickname='dev'
|
||||
followHandle=singleUserNickname+'@'+requestDomain
|
||||
|
||||
newFollowJson = {
|
||||
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||
|
@ -659,7 +667,7 @@ def sendFollowRequest(session,baseDir: str, \
|
|||
# follow request will block them again.
|
||||
removeFromFollowRejects(baseDir, \
|
||||
nickname,domain, \
|
||||
followNickname+'@'+requestDomain,debug)
|
||||
followHandle,debug)
|
||||
|
||||
sendSignedJson(newFollowJson,session,baseDir,nickname,domain,port, \
|
||||
followNickname,followDomain,followPort, \
|
||||
|
|
5
posts.py
5
posts.py
|
@ -1355,7 +1355,10 @@ def sendSignedJson(postJsonObject: {},session,baseDir: str, \
|
|||
if ':' not in toDomain:
|
||||
toDomain=toDomain+':'+str(toPort)
|
||||
|
||||
handle=httpPrefix+'://'+toDomain+'/@'+toNickname
|
||||
if toNickname:
|
||||
handle=httpPrefix+'://'+toDomain+'/@'+toNickname
|
||||
else:
|
||||
handle=httpPrefix+'://'+toDomain
|
||||
|
||||
if debug:
|
||||
print('DEBUG: handle - '+handle+' toPort '+str(toPort))
|
||||
|
|
Loading…
Reference in New Issue