From 373d252af886a5231d2fc94967c4399e235d119f Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Wed, 10 Apr 2024 13:34:30 -0400 Subject: [PATCH] fix: conn proto in invite webhook if known Signed-off-by: Daniel Bluhm --- aries_cloudagent/protocols/out_of_band/v1_0/manager.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aries_cloudagent/protocols/out_of_band/v1_0/manager.py b/aries_cloudagent/protocols/out_of_band/v1_0/manager.py index 590a4a70b0..b55e492615 100644 --- a/aries_cloudagent/protocols/out_of_band/v1_0/manager.py +++ b/aries_cloudagent/protocols/out_of_band/v1_0/manager.py @@ -302,6 +302,13 @@ async def handle_handshake_protos( no connection is created, representing a connectionless exchange. """ assert self.handshake_protocols + + if len(self.handshake_protocols) == 1: + connection_protocol = DIDCommPrefix.unqualify(self.handshake_protocols[0]) + else: + # We don't know which protocol will be used until the request is received + connection_protocol = None + conn_rec = ConnRecord( invitation_key=invitation_key, invitation_msg_id=self.msg_id, @@ -310,6 +317,7 @@ async def handle_handshake_protos( state=ConnRecord.State.INVITATION.rfc23, accept=self.auto_accept, alias=self.alias, + connection_protocol=connection_protocol, ) async with self.profile.transaction() as session: