mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-10 02:17:59 +00:00
actor: implement loop breaking for follow handshake
This commit is contained in:
parent
26ed936019
commit
0941c66f7c
|
@ -210,6 +210,9 @@ async def handle_follow(actor, data, request):
|
||||||
following += [inbox]
|
following += [inbox]
|
||||||
DATABASE['relay-list'] = following
|
DATABASE['relay-list'] = following
|
||||||
|
|
||||||
|
if data['object'].endswith('/actor'):
|
||||||
|
asyncio.ensure_future(follow_remote_actor(actor['id']))
|
||||||
|
|
||||||
message = {
|
message = {
|
||||||
"@context": "https://www.w3.org/ns/activitystreams",
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
"type": "Accept",
|
"type": "Accept",
|
||||||
|
@ -229,9 +232,6 @@ async def handle_follow(actor, data, request):
|
||||||
|
|
||||||
asyncio.ensure_future(push_message_to_actor(actor, message, 'https://{}/actor#main-key'.format(request.host)))
|
asyncio.ensure_future(push_message_to_actor(actor, message, 'https://{}/actor#main-key'.format(request.host)))
|
||||||
|
|
||||||
if data['object'].endswith('/actor'):
|
|
||||||
asyncio.ensure_future(follow_remote_actor(actor['id']))
|
|
||||||
|
|
||||||
|
|
||||||
async def handle_undo(actor, data, request):
|
async def handle_undo(actor, data, request):
|
||||||
global DATABASE
|
global DATABASE
|
||||||
|
|
Loading…
Reference in a new issue