Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: conn proto in invite webhook if known #2880

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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