use correct actor variable for cli_inbox_follow

This commit is contained in:
Izalia Mae 2022-11-20 22:24:36 -05:00
parent 395971914b
commit 242052386e

View file

@ -146,11 +146,15 @@ def cli_inbox_follow(actor):
except KeyError: except KeyError:
actor_data = asyncio.run(misc.request(actor)) actor_data = asyncio.run(misc.request(actor))
if not actor_data:
return click.echo(f'Failed to fetch actor: {actor}')
inbox = actor_data.shared_inbox inbox = actor_data.shared_inbox
message = misc.Message.new_follow( message = misc.Message.new_follow(
host = app.config.host, host = app.config.host,
actor = actor.id actor = actor
) )
asyncio.run(misc.request(inbox, message)) asyncio.run(misc.request(inbox, message))