Masked email: x:MaskedEmail/changes and a state in /get (fork additions)
The fork's per-account change log answers /changes, collapsing a mask created and destroyed in the window. /changes on a registry type needs that type's get permission.
This commit is contained in:
@@ -128,6 +128,10 @@ impl Response<'_> {
|
||||
ChangesResponseMethod::ShareNotification(response) => {
|
||||
response.eval_jptr(path, &mut results)
|
||||
}
|
||||
// inbuxa: x:MaskedEmail/changes
|
||||
ChangesResponseMethod::Registry(response) => {
|
||||
response.eval_jptr(path, &mut results)
|
||||
}
|
||||
},
|
||||
ResponseMethod::Query(response) => response.eval_jptr(path, &mut results),
|
||||
ResponseMethod::QueryChanges(response) => {
|
||||
|
||||
@@ -361,7 +361,12 @@ impl MethodName {
|
||||
"get" => MethodFunction::Get,
|
||||
"set" => MethodFunction::Set,
|
||||
"query" => MethodFunction::Query,
|
||||
"changes" => MethodFunction::Changes,
|
||||
)?;
|
||||
// inbuxa: only masked email has /changes (a fork addition)
|
||||
if fnc == MethodFunction::Changes && obj != ObjectType::MaskedEmail {
|
||||
return None;
|
||||
}
|
||||
|
||||
if obj.flags() & OBJ_SINGLETON == 0 || fnc != MethodFunction::Query {
|
||||
(MethodObject::Registry(obj), fnc).into()
|
||||
|
||||
@@ -137,6 +137,8 @@ pub enum ChangesResponseMethod {
|
||||
CalendarEvent(Box<ChangesResponse<CalendarEvent>>),
|
||||
CalendarEventNotification(Box<ChangesResponse<CalendarEventNotification>>),
|
||||
ShareNotification(Box<ChangesResponse<ShareNotification>>),
|
||||
// inbuxa: x:MaskedEmail/changes
|
||||
Registry(Box<ChangesResponse<crate::object::registry::Registry>>),
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user