feat: add verified offline recovery and retire legacy send assembly

This commit is contained in:
abaishu0730 committed 2026-10-21 11:12:18 +08:00
1 parent 84e2f0d9ba
commit 1148aa6f14
19 files changed
+235 -24

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ async function mailApi({mail,workspace,user,route,method,body,request,response,r
const audit=(action,detail)=>workspace?.record(user,action,detail);
if(route==='/api/mail/templates/categories'){
if(method==='GET'){reply(200,{categories:require('../order-rules/catalog.cjs').seedRules().map(({id,name})=>({id,name})),bindings:store.categoryBindings()});return true;}
if(method==='POST'){if(mail.historyOnly)fail('只读邮件空间不能修改类别关联。',409);const saved=store.bindCategory(body);audit('mail.category.bind',saved.categoryId);reply(200,saved);return true;}
if(method==='POST')fail('旧类别模板关联已改为只读,请在分类通知规则选择模板。',410);
}
if(route==='/api/mail/channels'&&method==='POST'){
if(!secureBpmTransport(request,trustedProxy))fail('请在部署机本地或 HTTPS 页面维护邮箱账号。',403);