@@ -2,7 +2,12 @@ use crate::bubble_history::GetBubbleHistoryResponse;
22use crate :: bubble_info:: GetBubbleInfoResponse ;
33use crate :: bubble_list:: GetBubbleListResponse ;
44use crate :: bubble_mark:: PostBubbleMarkRequest ;
5- use crate :: { bubble_create, bubble_delete, bubble_history, bubble_info, bubble_list, bubble_mark, bubble_membership_search, bubble_update, dm_create, membership_update, MembershipUpdateModification , NotificationsPreference , PostBubbleMembershipSearchRequest , PostMembershipUpdateRequest , ProntoClient , ResponseError } ;
5+ use crate :: {
6+ bubble_create, bubble_delete, bubble_history, bubble_info, bubble_list, bubble_mark,
7+ bubble_membership_search, bubble_update, dm_create, membership_update,
8+ MembershipUpdateModification , NotificationsPreference , PostBubbleMembershipSearchRequest ,
9+ PostMembershipUpdateRequest , ProntoClient , ResponseError ,
10+ } ;
611
712impl ProntoClient {
813 pub async fn create_dm (
@@ -229,20 +234,30 @@ impl ProntoClient {
229234 . to_result ( ) ?)
230235 }
231236
232- pub async fn pin_message ( & self , bubble_id : u64 , message_id : u64 , end : chrono:: NaiveDateTime ) -> Result < bubble_update:: BubbleUpdateResponse , ResponseError > {
237+ pub async fn pin_message (
238+ & self ,
239+ bubble_id : u64 ,
240+ message_id : u64 ,
241+ end : chrono:: NaiveDateTime ,
242+ ) -> Result < bubble_update:: BubbleUpdateResponse , ResponseError > {
233243 Ok ( bubble_update:: post (
234244 & self . api_base_url ,
235245 & self . http_client ,
236246 bubble_update:: PostBubbleUpdateRequest {
237247 bubble_id,
238- modification : bubble_update:: BubbleUpdateModification :: SetPinnedMessage ( ( message_id, end) ) ,
248+ modification : bubble_update:: BubbleUpdateModification :: SetPinnedMessage ( (
249+ message_id, end,
250+ ) ) ,
239251 } ,
240252 )
241- . await ?
242- . to_result ( ) ?)
253+ . await ?
254+ . to_result ( ) ?)
243255 }
244256
245- pub async fn unpin_message ( & self , bubble_id : u64 ) -> Result < bubble_update:: BubbleUpdateResponse , ResponseError > {
257+ pub async fn unpin_message (
258+ & self ,
259+ bubble_id : u64 ,
260+ ) -> Result < bubble_update:: BubbleUpdateResponse , ResponseError > {
246261 Ok ( bubble_update:: post (
247262 & self . api_base_url ,
248263 & self . http_client ,
@@ -251,8 +266,8 @@ impl ProntoClient {
251266 modification : bubble_update:: BubbleUpdateModification :: RemovePinnedMessage ( ) ,
252267 } ,
253268 )
254- . await ?
255- . to_result ( ) ?)
269+ . await ?
270+ . to_result ( ) ?)
256271 }
257272
258273 pub async fn set_bubble_title (
@@ -268,8 +283,8 @@ impl ProntoClient {
268283 modification : bubble_update:: BubbleUpdateModification :: SetTitle ( title) ,
269284 } ,
270285 )
271- . await ?
272- . to_result ( ) ?)
286+ . await ?
287+ . to_result ( ) ?)
273288 }
274289
275290 pub async fn set_bubble_category (
@@ -285,32 +300,37 @@ impl ProntoClient {
285300 modification : bubble_update:: BubbleUpdateModification :: SetCategory ( category_id) ,
286301 } ,
287302 )
288- . await ?
289- . to_result ( ) ?)
303+ . await ?
304+ . to_result ( ) ?)
290305 }
291306
292307 pub async fn modify_bubble_permission (
293308 & self ,
294309 bubble_id : u64 ,
295310 name : String ,
296- value : String
311+ value : String ,
297312 ) -> Result < bubble_update:: BubbleUpdateResponse , ResponseError > {
298313 Ok ( bubble_update:: post (
299314 & self . api_base_url ,
300315 & self . http_client ,
301316 bubble_update:: PostBubbleUpdateRequest {
302317 bubble_id,
303- modification : bubble_update:: BubbleUpdateModification :: ModifyPermission ( crate :: Property {
304- key : name,
305- value : serde_json:: Value :: String ( value)
306- } ) ,
318+ modification : bubble_update:: BubbleUpdateModification :: ModifyPermission (
319+ crate :: Property {
320+ key : name,
321+ value : serde_json:: Value :: String ( value) ,
322+ } ,
323+ ) ,
307324 } ,
308325 )
309- . await ?
310- . to_result ( ) ?)
326+ . await ?
327+ . to_result ( ) ?)
311328 }
312329
313- pub async fn delete_bubble ( & self , bubble_id : u64 ) -> Result < bubble_delete:: PostBubbleDeleteResponse , ResponseError > {
330+ pub async fn delete_bubble (
331+ & self ,
332+ bubble_id : u64 ,
333+ ) -> Result < bubble_delete:: PostBubbleDeleteResponse , ResponseError > {
314334 Ok ( bubble_delete:: post (
315335 & self . api_base_url ,
316336 & self . http_client ,
0 commit comments