mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-24 23:41:09 +00:00
pass instance row to HttpClient.post
This commit is contained in:
parent
1668d96485
commit
3d81e5ef68
|
@ -414,7 +414,7 @@ def cli_inbox_follow(ctx: click.Context, actor: str) -> None:
|
||||||
actor = actor
|
actor = actor
|
||||||
)
|
)
|
||||||
|
|
||||||
asyncio.run(http.post(inbox, message))
|
asyncio.run(http.post(inbox, message, None, inbox_data))
|
||||||
click.echo(f'Sent follow message to actor: {actor}')
|
click.echo(f'Sent follow message to actor: {actor}')
|
||||||
|
|
||||||
|
|
||||||
|
@ -455,7 +455,7 @@ def cli_inbox_unfollow(ctx: click.Context, actor: str) -> None:
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
asyncio.run(http.post(inbox, message))
|
asyncio.run(http.post(inbox, message, inbox_data))
|
||||||
click.echo(f'Sent unfollow message to: {actor}')
|
click.echo(f'Sent unfollow message to: {actor}')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -100,14 +100,10 @@ async def handle_follow(view: ActorView) -> None:
|
||||||
return
|
return
|
||||||
|
|
||||||
if conn.get_inbox(view.actor.shared_inbox):
|
if conn.get_inbox(view.actor.shared_inbox):
|
||||||
data = {'followid': view.message.id}
|
view.instance = conn.update_inbox(view.actor.shared_inbox, followid = view.message.id)
|
||||||
statement = tinysql.Update('inboxes', data, inbox = view.actor.shared_inbox)
|
|
||||||
|
|
||||||
with conn.query(statement):
|
|
||||||
pass
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
conn.put_inbox(
|
view.instance = conn.put_inbox(
|
||||||
view.actor.domain,
|
view.actor.domain,
|
||||||
view.actor.shared_inbox,
|
view.actor.shared_inbox,
|
||||||
view.actor.id,
|
view.actor.id,
|
||||||
|
@ -122,7 +118,8 @@ async def handle_follow(view: ActorView) -> None:
|
||||||
actor = view.actor.id,
|
actor = view.actor.id,
|
||||||
followid = view.message.id,
|
followid = view.message.id,
|
||||||
accept = True
|
accept = True
|
||||||
)
|
),
|
||||||
|
view.instance
|
||||||
)
|
)
|
||||||
|
|
||||||
# Are Akkoma and Pleroma the only two that expect a follow back?
|
# Are Akkoma and Pleroma the only two that expect a follow back?
|
||||||
|
@ -133,7 +130,8 @@ async def handle_follow(view: ActorView) -> None:
|
||||||
Message.new_follow(
|
Message.new_follow(
|
||||||
host = view.config.domain,
|
host = view.config.domain,
|
||||||
actor = view.actor.id
|
actor = view.actor.id
|
||||||
)
|
),
|
||||||
|
view.instance
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,7 +155,8 @@ async def handle_undo(view: ActorView) -> None:
|
||||||
host = view.config.domain,
|
host = view.config.domain,
|
||||||
actor = view.actor.id,
|
actor = view.actor.id,
|
||||||
follow = view.message
|
follow = view.message
|
||||||
)
|
),
|
||||||
|
view.instance
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue