mirror of https://gitlab.com/bashrc2/epicyon
Move function to follow send
parent
36ffe273be
commit
42a1b4882e
16
follow.py
16
follow.py
|
@ -538,14 +538,6 @@ def followedAccountAccepts(session,baseDir: str,httpPrefix: str, \
|
||||||
"""
|
"""
|
||||||
acceptHandle=nickname+'@'+domain
|
acceptHandle=nickname+'@'+domain
|
||||||
|
|
||||||
# Remove any follow requests rejected for the account being followed.
|
|
||||||
# It's assumed that if you are following someone then you are
|
|
||||||
# ok with them following back. If this isn't the case then a rejected
|
|
||||||
# follow request will block them again.
|
|
||||||
removeFromFollowRejects(baseDir, \
|
|
||||||
nicknameToFollow,domainToFollow, \
|
|
||||||
acceptHandle)
|
|
||||||
|
|
||||||
# send accept back
|
# send accept back
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: sending Accept activity for follow request which arrived at '+ \
|
print('DEBUG: sending Accept activity for follow request which arrived at '+ \
|
||||||
|
@ -645,6 +637,14 @@ def sendFollowRequest(session,baseDir: str, \
|
||||||
'object': followedId
|
'object': followedId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Remove any follow requests rejected for the account being followed.
|
||||||
|
# It's assumed that if you are following someone then you are
|
||||||
|
# ok with them following back. If this isn't the case then a rejected
|
||||||
|
# follow request will block them again.
|
||||||
|
removeFromFollowRejects(baseDir, \
|
||||||
|
nickname,domain, \
|
||||||
|
followNickname+'@'+requestDomain)
|
||||||
|
|
||||||
sendSignedJson(newFollowJson,session,baseDir,nickname,domain,port, \
|
sendSignedJson(newFollowJson,session,baseDir,nickname,domain,port, \
|
||||||
followNickname,followDomain,followPort, \
|
followNickname,followDomain,followPort, \
|
||||||
'https://www.w3.org/ns/activitystreams#Public', \
|
'https://www.w3.org/ns/activitystreams#Public', \
|
||||||
|
|
Loading…
Reference in New Issue