File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
bindings/matrix-sdk-ffi/src Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,8 @@ impl Client {
421421 } ) ) )
422422 }
423423
424- /// Allows generic GET requests to be made through the SDKs internal HTTP client
424+ /// Allows generic GET requests to be made through the SDKs internal HTTP
425+ /// client
425426 pub async fn get_url ( & self , url : String ) -> Result < String , ClientError > {
426427 let http_client = self . inner . http_client ( ) ;
427428 Ok ( http_client. get ( url) . send ( ) . await ?. text ( ) . await ?)
Original file line number Diff line number Diff line change 1+ use serde:: Deserialize ;
2+
3+ use crate :: ClientError ;
4+
5+ /// Well-known settings specific to ElementCall
6+ #[ derive( Deserialize , uniffi:: Record ) ]
7+ pub struct ElementCallWellKnown {
8+ widget_url : String ,
9+ }
10+
11+ /// Element specific well-known settings
12+ #[ derive( Deserialize , uniffi:: Record ) ]
13+ pub struct ElementWellKnown {
14+ call : ElementCallWellKnown ,
15+ }
16+
17+ /// Helper function to parse a string into a ElementWellKnown struct
18+ #[ uniffi:: export]
19+ pub fn make_element_well_known ( string : String ) -> Result < ElementWellKnown , ClientError > {
20+ serde_json:: from_str ( & string) . map_err ( ClientError :: new)
21+ }
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ mod authentication;
2424mod chunk_iterator;
2525mod client;
2626mod client_builder;
27+ mod element;
2728mod encryption;
2829mod error;
2930mod event;
You can’t perform that action at this time.
0 commit comments