@@ -136,12 +136,16 @@ async def edit(self) -> "httpx.Response":
136136 if bool (self .files ) is False :
137137 patch_kwargs = {
138138 "json" : self .json ,
139- "params" : { "wait" : True } ,
139+ "params" : self . _query_params ,
140140 "timeout" : self .timeout ,
141141 }
142142 else :
143143 self .files ["payload_json" ] = (None , json .dumps (self .json ))
144- patch_kwargs = {"files" : self .files , "timeout" : self .timeout }
144+ patch_kwargs = {
145+ "files" : self .files ,
146+ "params" : self ._query_params ,
147+ "timeout" : self .timeout ,
148+ }
145149 request = partial (client .patch , url , ** patch_kwargs )
146150 response = await request ()
147151 if response .status_code in [200 , 204 ]:
@@ -171,7 +175,9 @@ async def delete(self) -> "httpx.Response":
171175 ), "Webhook URL needs to be set in order to delete the webhook."
172176 url = f"{ self .url } /messages/{ self .id } "
173177 async with self .http_client as client : # type: httpx.AsyncClient
174- response = await client .delete (url , timeout = self .timeout )
178+ response = await client .delete (
179+ url , params = self ._query_params , timeout = self .timeout
180+ )
175181 if response .status_code in [200 , 204 ]:
176182 logger .debug ("Webhook deleted" )
177183 else :
0 commit comments