Skip to content

Commit

Permalink
Merge pull request #2880 from dbluhm/fix/conn-proto-at-invite-phase
Browse files Browse the repository at this point in the history
fix: conn proto in invite webhook if known
  • Loading branch information
swcurran authored Apr 10, 2024
2 parents 1ad4958 + 9702daa commit 81122eb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions aries_cloudagent/protocols/out_of_band/v1_0/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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:
Expand Down

0 comments on commit 81122eb

Please sign in to comment.