File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
bindings/matrix-sdk-ffi/src Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,7 @@ impl Client {
421421 } ) ) )
422422 }
423423
424+ /// Allows generic GET requests to be made through the SDKs internal HTTP client
424425 pub async fn get_url ( & self , url : String ) -> Result < String , ClientError > {
425426 let http_client = self . inner . http_client ( ) ;
426427 Ok ( http_client. get ( url) . send ( ) . await ?. text ( ) . await ?)
@@ -504,6 +505,12 @@ impl Client {
504505 Ok ( user_id. to_string ( ) )
505506 }
506507
508+ /// The server name part of the current user ID
509+ pub fn user_id_server_name ( & self ) -> Result < String , ClientError > {
510+ let user_id = self . inner . user_id ( ) . context ( "No User ID found" ) ?;
511+ Ok ( user_id. server_name ( ) . to_string ( ) )
512+ }
513+
507514 pub async fn display_name ( & self ) -> Result < String , ClientError > {
508515 let display_name =
509516 self . inner . account ( ) . get_display_name ( ) . await ?. context ( "No User ID found" ) ?;
You can’t perform that action at this time.
0 commit comments