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: