Skip to content

Commit

Permalink
Merge pull request #1797 from Indicio-tech/feature/invitation-connect…
Browse files Browse the repository at this point in the history
…ion-filter

feat: Add filter param to connection list for invitations
  • Loading branch information
swcurran authored Jun 8, 2022
2 parents 00d97b3 + 0d588bb commit 43c576b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aries_cloudagent/protocols/connections/v1_0/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ class ConnectionsListQueryStringSchema(OpenAPISchema):
),
example=ConnRecord.Protocol.RFC_0160.aries_protocol,
)
invitation_msg_id = fields.UUID(
description="Identifier of the associated Invitation Mesage",
required=False,
example=UUIDFour.EXAMPLE,
)


class CreateInvitationQueryStringSchema(OpenAPISchema):
Expand Down Expand Up @@ -336,6 +341,7 @@ async def connections_list(request: web.BaseRequest):
"request_id",
"invitation_key",
"their_public_did",
"invitation_msg_id",
):
if param_name in request.query and request.query[param_name] != "":
tag_filter[param_name] = request.query[param_name]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async def test_connections_list(self):
"connection_protocol": ConnRecord.Protocol.RFC_0160.aries_protocol,
"invitation_key": "some-invitation-key",
"their_public_did": "a_public_did",
"invitation_msg_id": "dummy_msg",
}

STATE_COMPLETED = ConnRecord.State.COMPLETED
Expand Down Expand Up @@ -94,6 +95,7 @@ async def test_connections_list(self):
"invitation_id": "dummy",
"invitation_key": "some-invitation-key",
"their_public_did": "a_public_did",
"invitation_msg_id": "dummy_msg",
},
post_filter_positive={
"their_role": [v for v in ConnRecord.Role.REQUESTER.value],
Expand Down

0 comments on commit 43c576b

Please sign in to comment.