Following single user instances

main2
Bob Mottram 2019-10-21 15:12:22 +01:00
parent 6da5c21edb
commit db621abb6f
2 changed files with 15 additions and 4 deletions

View File

@ -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, \

View File

@ -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))