diff --git a/aries_cloudagent/protocols/didexchange/v1_0/manager.py b/aries_cloudagent/protocols/didexchange/v1_0/manager.py index 20c34b1ef4..bd2017388f 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/manager.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/manager.py @@ -499,7 +499,10 @@ async def receive_request( conn_rec.their_did = request.did conn_rec.state = ConnRecord.State.REQUEST.rfc23 conn_rec.request_id = request._id - + async with self.profile.session() as session: + await conn_rec.save( + session, reason="Received connection request from invitation" + ) else: # request is against implicit invitation on public DID async with self.profile.session() as session: diff --git a/aries_cloudagent/protocols/out_of_band/v1_0/routes.py b/aries_cloudagent/protocols/out_of_band/v1_0/routes.py index f96f859f86..3f7384c164 100644 --- a/aries_cloudagent/protocols/out_of_band/v1_0/routes.py +++ b/aries_cloudagent/protocols/out_of_band/v1_0/routes.py @@ -9,7 +9,6 @@ from marshmallow.exceptions import ValidationError from ....admin.request_context import AdminRequestContext -from ....connections.models.conn_record import ConnRecordSchema from ....messaging.models.base import BaseModelError from ....messaging.models.openapi import OpenAPISchema from ....messaging.valid import UUID4 @@ -22,6 +21,7 @@ from .messages.invitation import HSProto, InvitationMessage, InvitationMessageSchema from .message_types import SPEC_URI from .models.invitation import InvitationRecordSchema +from .models.oob_record import OobRecordSchema LOGGER = logging.getLogger(__name__) @@ -188,7 +188,7 @@ async def invitation_create(request: web.BaseRequest): ) @querystring_schema(InvitationReceiveQueryStringSchema()) @request_schema(InvitationMessageSchema()) -@response_schema(ConnRecordSchema(), 200, description="") +@response_schema(OobRecordSchema(), 200, description="") async def invitation_receive(request: web.BaseRequest): """ Request handler for receiving a new connection invitation.