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:
2026-09-18 16:25:54 -07:00
parent 53ccc8f4de
commit 7080028437
9 changed files with 170 additions and 11 deletions
+4
View File
@@ -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) => {
+5
View File
@@ -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()
+2
View File
@@ -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)]