From 0813cf226de3062ca06e1ffa28b461053b21e15c Mon Sep 17 00:00:00 2001 From: SouthFox Date: Mon, 31 Jul 2023 04:59:23 +0800 Subject: [PATCH] [fix] nest accept respond --- app/boxes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/boxes.py b/app/boxes.py index 6a7f389..0793a97 100644 --- a/app/boxes.py +++ b/app/boxes.py @@ -150,9 +150,13 @@ async def process_incoming( if await _handle_undo(db_session, ap_object): return True elif ap_object["type"] in ["Accept", "Rejact"]: + follow_id = ap_object["object"] + if isinstance(follow_id, dict): + follow_id = follow_id["id"] + relate_following_object = (await db_session.execute( select(models.OutboxObject) - .where(models.OutboxObject.ap_id == ap_object["object"]) + .where(models.OutboxObject.ap_id == follow_id) .options( joinedload(models.OutboxObject.relates_to_inbox_object).options( joinedload(models.InboxObject.actor)