mirror of https://gitlab.com/bashrc2/epicyon
Following single user instances
parent
6da5c21edb
commit
db621abb6f
10
follow.py
10
follow.py
|
@ -643,7 +643,15 @@ def sendFollowRequest(session,baseDir: str, \
|
||||||
|
|
||||||
statusNumber,published = getStatusNumber()
|
statusNumber,published = getStatusNumber()
|
||||||
|
|
||||||
|
if followNickname:
|
||||||
followedId=followHttpPrefix+'://'+requestDomain+'/users/'+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 = {
|
newFollowJson = {
|
||||||
'@context': 'https://www.w3.org/ns/activitystreams',
|
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||||
|
@ -659,7 +667,7 @@ def sendFollowRequest(session,baseDir: str, \
|
||||||
# follow request will block them again.
|
# follow request will block them again.
|
||||||
removeFromFollowRejects(baseDir, \
|
removeFromFollowRejects(baseDir, \
|
||||||
nickname,domain, \
|
nickname,domain, \
|
||||||
followNickname+'@'+requestDomain,debug)
|
followHandle,debug)
|
||||||
|
|
||||||
sendSignedJson(newFollowJson,session,baseDir,nickname,domain,port, \
|
sendSignedJson(newFollowJson,session,baseDir,nickname,domain,port, \
|
||||||
followNickname,followDomain,followPort, \
|
followNickname,followDomain,followPort, \
|
||||||
|
|
3
posts.py
3
posts.py
|
@ -1355,7 +1355,10 @@ def sendSignedJson(postJsonObject: {},session,baseDir: str, \
|
||||||
if ':' not in toDomain:
|
if ':' not in toDomain:
|
||||||
toDomain=toDomain+':'+str(toPort)
|
toDomain=toDomain+':'+str(toPort)
|
||||||
|
|
||||||
|
if toNickname:
|
||||||
handle=httpPrefix+'://'+toDomain+'/@'+toNickname
|
handle=httpPrefix+'://'+toDomain+'/@'+toNickname
|
||||||
|
else:
|
||||||
|
handle=httpPrefix+'://'+toDomain
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: handle - '+handle+' toPort '+str(toPort))
|
print('DEBUG: handle - '+handle+' toPort '+str(toPort))
|
||||||
|
|
Loading…
Reference in New Issue