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)