File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed
aries_cloudcontroller/controllers Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ async def create_invitation(
7777 auto_accept : bool = None ,
7878 public : str = None ,
7979 multi_use : str = None ,
80+ invite_options : {} = None ,
8081 ):
8182 params = {}
8283 if alias :
@@ -87,10 +88,29 @@ async def create_invitation(
8788 params ["public" ] = public
8889 if multi_use :
8990 params ["multi_use" ] = multi_use
90-
91- invite_details = await self .admin_POST (
92- "/connections/create-invitation" , params = params
93- )
91+ if invite_options :
92+ """A dictionary of the form:
93+ {
94+ "mediation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
95+ "metadata": {},
96+ "recipient_keys": [
97+ "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
98+ ],
99+ "routing_keys": [
100+ "H3C2AVvLMv6gmMNam3uVAjZpfkcJCwDwnZn6z3wXmqPV"
101+ ],
102+ "service_endpoint": "http://192.168.56.102:8020"
103+ }
104+ """
105+ invite_details = await self .admin_POST (
106+ "/connections/create-invitation" ,
107+ params = params ,
108+ json_data = invite_options ,
109+ )
110+ else :
111+ invite_details = await self .admin_POST (
112+ "/connections/create-invitation" , params = params
113+ )
94114 connection = Connection (invite_details ["connection_id" ], "invitation" )
95115 self .connections .append (connection )
96116 return invite_details
You can’t perform that action at this time.
0 commit comments