[fix] nest accept respond
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
SouthFox 2023-07-31 04:59:23 +08:00
parent 64e98ee23a
commit 0813cf226d

View file

@ -150,9 +150,13 @@ async def process_incoming(
if await _handle_undo(db_session, ap_object): if await _handle_undo(db_session, ap_object):
return True return True
elif ap_object["type"] in ["Accept", "Rejact"]: 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( relate_following_object = (await db_session.execute(
select(models.OutboxObject) select(models.OutboxObject)
.where(models.OutboxObject.ap_id == ap_object["object"]) .where(models.OutboxObject.ap_id == follow_id)
.options( .options(
joinedload(models.OutboxObject.relates_to_inbox_object).options( joinedload(models.OutboxObject.relates_to_inbox_object).options(
joinedload(models.InboxObject.actor) joinedload(models.InboxObject.actor)