Merge branch '3pid' into 'master'
Add support for a minimal `r0/account/3pid`. See merge request famedly/conduit!151
This commit is contained in:
		
						commit
						3745a7cbe6
					
				
					 2 changed files with 8 additions and 5 deletions
				
			
		|  | @ -14,6 +14,7 @@ use ruma::{ | ||||||
|                 change_password, deactivate, get_username_availability, register, whoami, |                 change_password, deactivate, get_username_availability, register, whoami, | ||||||
|                 ThirdPartyIdRemovalStatus, |                 ThirdPartyIdRemovalStatus, | ||||||
|             }, |             }, | ||||||
|  |             contact::get_contacts, | ||||||
|             uiaa::{AuthFlow, UiaaInfo}, |             uiaa::{AuthFlow, UiaaInfo}, | ||||||
|         }, |         }, | ||||||
|     }, |     }, | ||||||
|  | @ -715,16 +716,17 @@ pub async fn deactivate_route( | ||||||
|     .into()) |     .into()) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /*/ | /// # `GET _matrix/client/r0/account/3pid`
 | ||||||
|  | ///
 | ||||||
|  | /// Get a list of third party identifiers associated with this account.
 | ||||||
| #[cfg_attr(
 | #[cfg_attr(
 | ||||||
|     feature = "conduit_bin", |     feature = "conduit_bin", | ||||||
|     get("/_matrix/client/r0/account/3pid", data = "<body>") |     get("/_matrix/client/r0/account/3pid", data = "<body>") | ||||||
| )] | )] | ||||||
| pub async fn third_party_route( | pub async fn third_party_route( | ||||||
|     body: Ruma<account::add_3pid::Request<'_>>, |     body: Ruma<get_contacts::Request>, | ||||||
| ) -> ConduitResult<account::add_3pid::Response> { | ) -> ConduitResult<get_contacts::Response> { | ||||||
|     let sender_user = body.sender_user.as_ref().expect("user is authenticated"); |     let sender_user = body.sender_user.as_ref().expect("user is authenticated"); | ||||||
| 
 | 
 | ||||||
|     Ok(account::add_3pid::Response::default().into()) |     Ok(get_contacts::Response::new(Vec::new()).into()) | ||||||
| } | } | ||||||
| */ |  | ||||||
|  |  | ||||||
|  | @ -50,6 +50,7 @@ fn setup_rocket(config: Figment, data: Arc<RwLock<Database>>) -> rocket::Rocket< | ||||||
|                 client_server::logout_all_route, |                 client_server::logout_all_route, | ||||||
|                 client_server::change_password_route, |                 client_server::change_password_route, | ||||||
|                 client_server::deactivate_route, |                 client_server::deactivate_route, | ||||||
|  |                 client_server::third_party_route, | ||||||
|                 client_server::get_capabilities_route, |                 client_server::get_capabilities_route, | ||||||
|                 client_server::get_pushrules_all_route, |                 client_server::get_pushrules_all_route, | ||||||
|                 client_server::set_pushrule_route, |                 client_server::set_pushrule_route, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue