Masked email: Fastmail's Masked Email API, MaskedEmail/get and /set (ME-1, ME-7a, ME-16)
Advertised as https://www.fastmail.com/dev/maskedemail in the session and on every account that may hold masks. Masks created through it start pending unless the create sets a state; pending can't be set again once left; state and the other mutable fields map onto the same records the x: API uses.
This commit is contained in:
@@ -162,6 +162,9 @@ impl RequestHandler for Server {
|
||||
SetResponseMethod::VacationResponse(set_response) => {
|
||||
set_response.update_created_ids(&mut response);
|
||||
}
|
||||
SetResponseMethod::MaskedEmail(set_response) => {
|
||||
set_response.update_created_ids(&mut response);
|
||||
}
|
||||
SetResponseMethod::AddressBook(set_response) => {
|
||||
set_response.update_created_ids(&mut response);
|
||||
}
|
||||
@@ -296,6 +299,13 @@ impl RequestHandler for Server {
|
||||
|
||||
self.vacation_response_get(*req).await?.into()
|
||||
}
|
||||
// inbuxa: Fastmail's MaskedEmail/get
|
||||
GetRequestMethod::MaskedEmail(mut req) => {
|
||||
resolve_account_id(&mut req.account_id, method_name.obj, access_token)?;
|
||||
crate::inbuxa::fastmail::get(self, access_token, *req)
|
||||
.await?
|
||||
.into()
|
||||
}
|
||||
GetRequestMethod::Principal(req) => {
|
||||
self.principal_get(*req, access_token).await?.into()
|
||||
}
|
||||
@@ -516,6 +526,13 @@ impl RequestHandler for Server {
|
||||
|
||||
self.vacation_response_set(*req, access_token).await?.into()
|
||||
}
|
||||
// inbuxa: Fastmail's MaskedEmail/set
|
||||
SetRequestMethod::MaskedEmail(mut req) => {
|
||||
resolve_account_id(&mut req.account_id, method_name.obj, access_token)?;
|
||||
crate::inbuxa::fastmail::set(self, access_token, *req)
|
||||
.await?
|
||||
.into()
|
||||
}
|
||||
SetRequestMethod::AddressBook(mut req) => {
|
||||
resolve_account_id(&mut req.account_id, method_name.obj, access_token)?;
|
||||
access_token.assert_has_access(req.account_id, Collection::AddressBook)?;
|
||||
|
||||
Reference in New Issue
Block a user