mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-22 06:27:59 +00:00
actor: handle remote actor fetch failures more gracefully
This commit is contained in:
parent
3af63d4d9f
commit
c9cd9a8337
|
@ -105,9 +105,12 @@ async def push_message_to_actor(actor, message, our_key_id):
|
|||
|
||||
|
||||
async def follow_remote_actor(actor_uri):
|
||||
logging.info('following: %r', actor_uri)
|
||||
|
||||
actor = await fetch_actor(actor_uri)
|
||||
if not actor:
|
||||
logging.info('failed to fetch actor at: %r', actor_uri)
|
||||
return
|
||||
|
||||
logging.info('following: %r', actor_uri)
|
||||
|
||||
message = {
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
|
@ -121,9 +124,12 @@ async def follow_remote_actor(actor_uri):
|
|||
|
||||
|
||||
async def unfollow_remote_actor(actor_uri):
|
||||
logging.info('unfollowing: %r', actor_uri)
|
||||
|
||||
actor = await fetch_actor(actor_uri)
|
||||
if not actor:
|
||||
logging.info('failed to fetch actor at: %r', actor_uri)
|
||||
return
|
||||
|
||||
logging.info('unfollowing: %r', actor_uri)
|
||||
|
||||
message = {
|
||||
"@context": "https://www.w3.org/ns/activitystreams",
|
||||
|
|
Loading…
Reference in a new issue