Skip to content

Commit 3a6b599

Browse files
committed
Change sending trust ping so it:
* takes an optional argument comment_msg * uses this arg to send a request with that comment or else * send a trust ping without any comment
1 parent cc39ea7 commit 3a6b599

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

aries_cloudcontroller/controllers/messaging.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ async def send_message(self, connection_id, msg):
2121
)
2222
return response
2323

24-
async def trust_ping(self, connection_id: str, msg: str):
25-
response = await self.admin_POST(
26-
f"/connections/{connection_id}/send-ping", {"content": msg}
27-
)
24+
async def trust_ping(self, connection_id: str, comment_msg: str = None):
25+
if comment_msg:
26+
response = await self.admin_POST(
27+
f"/connections/{connection_id}/send-ping", {"comment": comment_msg}
28+
)
29+
else:
30+
response = await self.admin_POST(f"/connections/{connection_id}/send-ping", {})
2831
return response

0 commit comments

Comments
 (0)