domma-cms 1.33.0 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/admin/js/lib/sidebar-notify.js +1 -1
  3. package/package.json +1 -1
  4. package/plugins/_lib/admin/mail/body-menu.js +1 -1
  5. package/plugins/_lib/admin/mail/cms-host.js +1 -1
  6. package/plugins/_lib/admin/mail/compose-window.js +1 -1
  7. package/plugins/_lib/admin/mail/contacts.js +1 -1
  8. package/plugins/_lib/admin/mail/diagnostics-section.js +1 -1
  9. package/plugins/_lib/admin/mail/drag-drop.js +1 -1
  10. package/plugins/_lib/admin/mail/folder-tree.js +1 -1
  11. package/plugins/_lib/admin/mail/font-controls.js +1 -1
  12. package/plugins/_lib/admin/mail/fonts.js +1 -1
  13. package/plugins/_lib/admin/mail/host-context.js +1 -1
  14. package/plugins/_lib/admin/mail/identity.js +1 -1
  15. package/plugins/_lib/admin/mail/image-senders-section.js +1 -1
  16. package/plugins/_lib/admin/mail/keyboard.js +1 -1
  17. package/plugins/_lib/admin/mail/mail.html +1 -1
  18. package/plugins/_lib/admin/mail/message-actions.js +1 -1
  19. package/plugins/_lib/admin/mail/oauth-panel.js +1 -1
  20. package/plugins/_lib/admin/mail/panes.js +1 -1
  21. package/plugins/_lib/admin/mail/reader-kit.js +1 -1
  22. package/plugins/_lib/admin/mail/reader-runtime.js +2 -1
  23. package/plugins/_lib/admin/mail/reader-view.js +1 -1
  24. package/plugins/_lib/admin/mail/resizable.js +1 -1
  25. package/plugins/_lib/admin/mail/restore-spam.js +1 -1
  26. package/plugins/_lib/admin/mail/rules.js +1 -1
  27. package/plugins/_lib/admin/mail/scheduling.js +1 -1
  28. package/plugins/_lib/admin/mail/section-kit.js +1 -1
  29. package/plugins/_lib/admin/mail/security-note.js +1 -1
  30. package/plugins/_lib/admin/mail/settings-section.js +12 -4
  31. package/plugins/_lib/admin/mail/templates.js +1 -1
  32. package/plugins/_lib/admin/mail/threads.js +1 -1
  33. package/plugins/_lib/admin/mail/vacation.js +1 -1
  34. package/plugins/_lib/admin/mail/when-closed.js +1 -1
  35. package/plugins/_lib/admin/ui/dates.js +1 -1
  36. package/plugins/_lib/admin/ui/resizable.js +1 -1
  37. package/plugins/_lib/domma-mail.lock.json +80 -80
  38. package/plugins/_lib/mail/accountFileStore.js +1 -1
  39. package/plugins/_lib/mail/accountRepository.js +23 -2
  40. package/plugins/_lib/mail/accountRoutes.js +1 -1
  41. package/plugins/_lib/mail/accounts.js +1 -1
  42. package/plugins/_lib/mail/bodyTokenProvider.js +1 -1
  43. package/plugins/_lib/mail/bodyTokens.js +1 -1
  44. package/plugins/_lib/mail/compose.js +1 -1
  45. package/plugins/_lib/mail/defaults.js +1 -1
  46. package/plugins/_lib/mail/envelope.js +1 -1
  47. package/plugins/_lib/mail/folderActions.js +1 -1
  48. package/plugins/_lib/mail/folderRuntime.js +1 -1
  49. package/plugins/_lib/mail/folders.js +1 -1
  50. package/plugins/_lib/mail/imapPoolRuntime.js +1 -1
  51. package/plugins/_lib/mail/mbox.js +1 -1
  52. package/plugins/_lib/mail/message-action.js +1 -1
  53. package/plugins/_lib/mail/messageSecurity.js +1 -1
  54. package/plugins/_lib/mail/messageSecurityProvider.js +1 -1
  55. package/plugins/_lib/mail/networkAddresses.js +1 -1
  56. package/plugins/_lib/mail/networkPolicy.js +1 -1
  57. package/plugins/_lib/mail/oauthAccounts.js +1 -1
  58. package/plugins/_lib/mail/oauthRouteRuntime.js +1 -1
  59. package/plugins/_lib/mail/oauthRuntime.js +1 -1
  60. package/plugins/_lib/mail/pollSchedule.js +1 -1
  61. package/plugins/_lib/mail/poller.js +1 -1
  62. package/plugins/_lib/mail/pollerRuntime.js +1 -1
  63. package/plugins/_lib/mail/priority.js +1 -1
  64. package/plugins/_lib/mail/publicMailbox.js +1 -1
  65. package/plugins/_lib/mail/readRuntime.js +1 -1
  66. package/plugins/_lib/mail/render.js +1 -1
  67. package/plugins/_lib/mail/ruleRunner.js +1 -1
  68. package/plugins/_lib/mail/schedulerRuntime.js +1 -1
  69. package/plugins/_lib/mail/secretProvider.js +1 -1
  70. package/plugins/_lib/mail/secretbox.js +1 -1
  71. package/plugins/_lib/mail/senderAuth.js +1 -1
  72. package/plugins/_lib/mail/sieve.js +1 -1
  73. package/plugins/_lib/mail/smtpService.js +1 -1
  74. package/plugins/_lib/mail/snoozeRuntime.js +1 -1
  75. package/plugins/_lib/mail/store.js +1 -1
  76. package/plugins/_lib/mail/subscriptions.js +1 -1
  77. package/plugins/_lib/mail/syncPlan.js +1 -1
  78. package/plugins/_lib/mail/syncRuntime.js +1 -1
  79. package/plugins/_lib/mail/syncSelection.js +8 -3
  80. package/plugins/_lib/mail/unreadBadge.js +1 -1
  81. package/plugins/_lib/mail/unsubscribe.js +1 -1
  82. package/plugins/_lib/mail/vacationRuntime.js +1 -1
  83. package/plugins/_lib/mail/write.js +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.34.0] - 2026-11-03
4
+
5
+ - Email Pro can notify for all folders or selected folders, with Check all and None controls in Email Settings. Folder choices are saved per mailbox and automatically included in background syncing. The sidebar badge continues to count Inbox unread messages. Folder notification marks are independent, including mailboxes with more than fifty folders.
6
+
3
7
  ## [1.33.0] - 2026-11-03
4
8
 
5
9
  - **`[map]`** - a responsive Google Map of one place: `[map postcode="SW1A 2AA" zoom="15" caption="Visit us" /]`, or `address`, `pin="lat,lon"`, `lat` + `lon`. Zoom 1-20, `lng` as well as `lon`, ratio, width, alignment and a caption; malformed coordinates show a notice rather than a broken map. Google's embed host is always allowed to frame, so no `config/embeds.json` entry is needed. In the shortcode menus under Media.
@@ -1 +1 @@
1
- export const prefsKey=(t,e)=>`dm.notify.${t||"anon"}.${e}`,marksKey=(t,e)=>`dm.notify.seen.${t||"anon"}.${e}`;const y=50,b=200;export function cleanNotify(t){if(!t||typeof t!="object"||Array.isArray(t))return null;const e={};if(t.marks&&typeof t.marks=="object"&&!Array.isArray(t.marks))for(const[o,s]of Object.entries(t.marks).slice(0,50)){const r=Number(s);Number.isFinite(r)&&o.length<=200&&!["__proto__","constructor","prototype"].includes(o)&&(e[o]=r)}if(!Object.keys(e).length)return null;const n=o=>String(o??"").replace(/\s+/g," ").trim().slice(0,200);return{marks:e,title:n(t.title)||"Something new",body:n(t.body)}}export function compareMarks(t,e){const n=t&&typeof t=="object"?t:{},o={...n};let s=!1;for(const[r,c]of Object.entries(e)){const i=Number(n[r]);Number.isFinite(i)?c>i&&(s=!0,o[r]=c):o[r]=c}return{rose:s,next:o}}export function readNotifyPrefs(t,e,n=globalThis.S){try{const o=n?.get(prefsKey(t,e));return{popup:o?.popup===!0,sound:o?.sound===!0}}catch{return{popup:!1,sound:!1}}}export function writeNotifyPrefs(t,e,n,o=globalThis.S){o.set(prefsKey(t,e),{popup:n?.popup===!0,sound:n?.sound===!0})}export function playChime(){try{const t=globalThis.AudioContext||globalThis.webkitAudioContext;if(!t)return;const e=new t,n=e.currentTime;[[880,0],[1318.5,.12]].forEach(([o,s])=>{const r=e.createOscillator(),c=e.createGain();r.type="sine",r.frequency.value=o,c.gain.setValueAtTime(1e-4,n+s),c.gain.exponentialRampToValueAtTime(.18,n+s+.02),c.gain.exponentialRampToValueAtTime(1e-4,n+s+.35),r.connect(c).connect(e.destination),r.start(n+s),r.stop(n+s+.4)}),setTimeout(()=>{try{e.close()}catch{}},1e3)}catch{}}export function noticeFromCount(t,e,n,o={}){const s=o.store??globalThis.S,r=cleanNotify(n);if(!r||!s)return!1;let c=null;try{c=s.get(marksKey(t,e))}catch{c=null}const{rose:i,next:f}=compareMarks(c,r.marks);try{s.set(marksKey(t,e),f)}catch{}if(!i)return!1;const u=readNotifyPrefs(t,e,s);let a=!1;const l=o.Notification??globalThis.Notification;if(u.popup&&l&&l.permission==="granted")try{const p=new l(r.title,{body:r.body,tag:`dm-notify:${e}`});p.onclick=()=>{try{globalThis.focus?.()}catch{}(o.open??(m=>{globalThis.location.hash=m}))(e),p.close?.()},a=!0}catch{}return u.sound&&((o.chime??playChime)(),a=!0),a}
1
+ export const prefsKey=(t,e)=>`dm.notify.${t||"anon"}.${e}`,marksKey=(t,e)=>`dm.notify.seen.${t||"anon"}.${e}`;const y=1e4,b=200;export function cleanNotify(t){if(!t||typeof t!="object"||Array.isArray(t))return null;const e={};if(t.marks&&typeof t.marks=="object"&&!Array.isArray(t.marks))for(const[o,s]of Object.entries(t.marks).slice(0,1e4)){const r=Number(s);Number.isFinite(r)&&o.length<=200&&!["__proto__","constructor","prototype"].includes(o)&&(e[o]=r)}if(!Object.keys(e).length)return null;const n=o=>String(o??"").replace(/\s+/g," ").trim().slice(0,200);return{marks:e,title:n(t.title)||"Something new",body:n(t.body)}}export function compareMarks(t,e){const n=t&&typeof t=="object"?t:{},o={...n};let s=!1;for(const[r,c]of Object.entries(e)){const i=Number(n[r]);Number.isFinite(i)?c>i&&(s=!0,o[r]=c):o[r]=c}return{rose:s,next:o}}export function readNotifyPrefs(t,e,n=globalThis.S){try{const o=n?.get(prefsKey(t,e));return{popup:o?.popup===!0,sound:o?.sound===!0}}catch{return{popup:!1,sound:!1}}}export function writeNotifyPrefs(t,e,n,o=globalThis.S){o.set(prefsKey(t,e),{popup:n?.popup===!0,sound:n?.sound===!0})}export function playChime(){try{const t=globalThis.AudioContext||globalThis.webkitAudioContext;if(!t)return;const e=new t,n=e.currentTime;[[880,0],[1318.5,.12]].forEach(([o,s])=>{const r=e.createOscillator(),c=e.createGain();r.type="sine",r.frequency.value=o,c.gain.setValueAtTime(1e-4,n+s),c.gain.exponentialRampToValueAtTime(.18,n+s+.02),c.gain.exponentialRampToValueAtTime(1e-4,n+s+.35),r.connect(c).connect(e.destination),r.start(n+s),r.stop(n+s+.4)}),setTimeout(()=>{try{e.close()}catch{}},1e3)}catch{}}export function noticeFromCount(t,e,n,o={}){const s=o.store??globalThis.S,r=cleanNotify(n);if(!r||!s)return!1;let c=null;try{c=s.get(marksKey(t,e))}catch{c=null}const{rose:i,next:f}=compareMarks(c,r.marks);try{s.set(marksKey(t,e),f)}catch{}if(!i)return!1;const u=readNotifyPrefs(t,e,s);let a=!1;const l=o.Notification??globalThis.Notification;if(u.popup&&l&&l.permission==="granted")try{const p=new l(r.title,{body:r.body,tag:`dm-notify:${e}`});p.onclick=()=>{try{globalThis.focus?.()}catch{}(o.open??(m=>{globalThis.location.hash=m}))(e),p.close?.()},a=!0}catch{}return u.sound&&((o.chime??playChime)(),a=!0),a}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "1.33.0",
3
+ "version": "1.34.0",
4
4
  "description": "File-based CMS powered by Domma and Fastify. Run npx domma-cms my-site to create a new project.",
5
5
  "type": "module",
6
6
  "main": "server/server.js",
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/body-menu.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/body-menu.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The reading pane's right-click menu - the pure parts.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/cms-host.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/cms-host.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** The CMS shell boundary. Standalone never imports this adapter. */
4
4
  const version = new URL(import.meta.url).searchParams.get('v') ?? '1';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/compose-window.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/compose-window.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
4
4
  const {createMailHost} = await import(new URL(`./host-context.js?v=${MAIL_MODULE_VERSION}`, import.meta.url).href);
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/contacts.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/contacts.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Recipient suggestions from the host address book.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/diagnostics-section.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/diagnostics-section.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The settings section that answers "which build is this, and what went wrong".
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/drag-drop.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/drag-drop.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Drag identities include the mailbox and source folder: UIDs alone are not unique. */
4
4
  const PROTECTED_USES = new Set(['\\Inbox', '\\Sent', '\\Drafts', '\\Trash', '\\Junk', '\\Archive', '\\All', '\\Flagged']);
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/folder-tree.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/folder-tree.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Mail folder presentation, shared by the Mail Reader and Email Pro.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/font-controls.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/font-controls.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/fonts.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/fonts.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The fonts and sizes the mail editor offers - pure, so both the compose
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/host-context.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/host-context.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Services supplied by the application that hosts the shared mail interface. */
4
4
  export function createMailApi({getToken, fetch: request = globalThis.fetch, onUnauthorized = () => {}}) {
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/identity.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/identity.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Who a mailbox sends as, and what it signs off with.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/image-senders-section.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/image-senders-section.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The settings section for senders whose images always load.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/keyboard.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/keyboard.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Keyboard navigation for the reader.
@@ -1,4 +1,4 @@
1
- <!-- Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/mail.html. -->
1
+ <!-- Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/mail.html. -->
2
2
  <div class="mail-layout">
3
3
 
4
4
  <!-- Folders -->
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/message-actions.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/message-actions.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * What other Tools add to a message's menu - Booking's "Book Sam...".
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/oauth-panel.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/oauth-panel.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * "Sign in with Microsoft / Google" for a mailbox - the part of the mailbox
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/panes.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/panes.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Pane sizing for the mail reader, shared by the Mail Reader and Email Pro.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/reader-kit.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/reader-kit.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The reader view's decisions that need no DOM - escaping, the mailbox form's
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/reader-runtime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/reader-runtime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
4
4
  const {createMailHost} = await import(new URL(`./host-context.js?v=${MAIL_MODULE_VERSION}`, import.meta.url).href);
@@ -942,6 +942,7 @@ return {
942
942
  canWrite: features.write,
943
943
  canSend: features.send === true,
944
944
  sidebarUrl: mailHost.routeHash,
945
+ renderNotificationSettings: extensions.notificationSettings,
945
946
  host: mailHost,
946
947
  userId: mailHost.getUser()?.id,
947
948
  load: () => readDelaySeconds(S.get(READ_DELAY_KEY)),
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/reader-view.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/reader-view.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Existing CMS entry point for the shared mail view. */
4
4
  const version = new URL(import.meta.url).searchParams.get('v') ?? '1';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/resizable.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/resizable.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The mail reader's resizable slideovers.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/restore-spam.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/restore-spam.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Undo restores both junk status and the original folder, following each UID remap. */
4
4
  export async function restoreSpam({api, base, account, from, destination, uids, spam}) {
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/rules.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/rules.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Filing rules.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/scheduling.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/scheduling.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/section-kit.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/section-kit.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/security-note.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/security-note.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * What the reader says about a signed or encrypted (S/MIME) message.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/settings-section.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/settings-section.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Browser preferences for the shared mail reader. */
4
4
  export const READ_DELAY_KEY = 'domma-mail.mark-read-seconds';
@@ -128,7 +128,7 @@ export function permissionWords(permission) {
128
128
  * notifications hang off (admin/js/lib/sidebar-notify.js).
129
129
  * @returns {object}
130
130
  */
131
- export function createSettingsSection({canWrite, canSend = false, load, save, sidebarUrl = null, userId = null, host = null}) {
131
+ export function createSettingsSection({canWrite, canSend = false, load, save, sidebarUrl = null, userId = null, host = null, renderNotificationSettings = null}) {
132
132
  const S = host?.storage ?? globalThis.S;
133
133
  return {
134
134
  id: 'settings',
@@ -138,7 +138,7 @@ export function createSettingsSection({canWrite, canSend = false, load, save, si
138
138
  const kit = await import(new URL(`./section-kit.js?v=${ctx.assetVersion ?? '1'}`, import.meta.url).href);
139
139
  const notify = sidebarUrl ? (host?.helpers.notifications ?? null) : null;
140
140
  const who = userId ?? host?.getUser()?.id ?? null;
141
- kit.note(container, 'Settings are saved in this browser and apply to all your mailboxes.');
141
+ kit.note(container, 'Reading, composing, popup and sound preferences are saved in this browser and apply to all your mailboxes.');
142
142
 
143
143
  const saveSteps = [];
144
144
 
@@ -204,13 +204,21 @@ export function createSettingsSection({canWrite, canSend = false, load, save, si
204
204
  // ---- Notifications -------------------------------------------
205
205
  if (notify) {
206
206
  kit.heading(container, 'Notifications');
207
- kit.note(container, 'While the admin is open in any tab, new mail in the inbox can pop up a notification and play a sound - checked about once a minute.');
207
+ kit.note(container, 'While the admin is open in any tab, new mail can pop up a notification and play a sound - checked about once a minute.');
208
208
  const current = notify.readNotifyPrefs(who, sidebarUrl);
209
209
  const supported = typeof Notification === 'function';
210
210
  const {state} = kit.formIn(container, {
211
211
  popup: {type: 'boolean', label: 'Show new messages notification popups', formConfig: {disabled: !supported}},
212
212
  sound: {type: 'boolean', label: 'Sound notification'}
213
213
  }, {popup: current.popup && supported, sound: current.sound});
214
+ if (renderNotificationSettings && ctx.account) {
215
+ try {
216
+ const saveFolders = await renderNotificationSettings(container, ctx, kit);
217
+ if (saveFolders) saveSteps.push(() => saveFolders);
218
+ } catch (err) {
219
+ kit.note(container, `Notification folders could not be loaded: ${err.message || 'Try reopening Settings.'}`);
220
+ }
221
+ }
214
222
  const status = kit.note(container, permissionWords(supported ? Notification.permission : undefined));
215
223
  const tools = kit.box(container, 'flex gap-2 items-center mb-2');
216
224
  kit.button(tools, 'Play the sound', () => notify.playChime(), {icon: 'play'});
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/templates.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/templates.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/threads.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/threads.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Grouping messages into conversations.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/vacation.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/vacation.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The automatic reply, and everything that must stop it.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/when-closed.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/mail/when-closed.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Run code when a Domma modal or slideover actually closes.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/ui/dates.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/ui/dates.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Dates as a plugin shows them to a person: dd/mm/yyyy, and dd/mm/yyyy HH:mm
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/admin/ui/resizable.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/admin/ui/resizable.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Making a slideover resizable.
@@ -1,86 +1,86 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@domma-mail/core",
4
- "version": "0.20.0",
4
+ "version": "0.21.0",
5
5
  "files": {
6
- "plugins/_lib/mail/defaults.js": "1401f4511c6e1c2d60a2eec2bc2bc5d2d3f8485d4e700e1759a1ce613309af03",
7
- "plugins/_lib/mail/priority.js": "7f55b1363954ada24e5b13b14a328f017b826d4c1433709d58650d6e6caf27d5",
8
- "plugins/_lib/mail/envelope.js": "2abec599965eb1cf3e1fb624a1010ab277fd5db7fd90e865e96e545a2bf60a1e",
9
- "plugins/_lib/mail/pollSchedule.js": "d0cfc98b4c7260db17bc86172131a2dea8b6a082bf49cd02772c4bdd9a08d3a3",
10
- "plugins/_lib/mail/syncPlan.js": "a2208a3db9df536ad7f35e1d53b771c550e3b76c21937ec38ebc6bb83675bd0c",
11
- "plugins/_lib/admin/mail/threads.js": "6239180f1094e613a194445d0b3ef35c84ee1d33518a739f918a2363fc1d2646",
12
- "plugins/_lib/admin/mail/vacation.js": "c73b3f586bc11df4a74f6833aa773c8a6f87c9b3367951eef0cb40c50d28e03b",
13
- "plugins/_lib/mail/secretProvider.js": "28a8cfd0206499f52f81a9106cd9df7be4ec859cc5f7c14f328ba7a47e75a2da",
14
- "plugins/_lib/mail/secretbox.js": "c8d7cf45d716e030a1b41e53b339d55d9f17b4e76ae570f18aa5d9b26f62a96b",
15
- "plugins/_lib/mail/bodyTokenProvider.js": "20fe75db9f7aee0df0c3208d3e7744997ee4d60073655d0ef738bd9ac06c70b6",
16
- "plugins/_lib/mail/bodyTokens.js": "39008557223f6c1136612a94b8ef64534124c50386680a985b9283d085e56f02",
17
- "plugins/_lib/mail/accountFileStore.js": "d025543548bdc278a6861b98a924bb4f793d69fafcbd32b857897d0a9e6a98a8",
18
- "plugins/_lib/mail/accountRepository.js": "b502cb3c669cf43960fc47d2686bf09f2089a2c20bd25af8ba8195456f872965",
19
- "plugins/_lib/mail/accountRoutes.js": "da105bf4f25f461edc9968eeee3109f2e36d73f3d46043752542eaf9b478ddbb",
20
- "plugins/_lib/mail/networkAddresses.js": "dbfced8fb48e592a432677bb6fc26ca562f415314b8b3911bbf8403e03dee058",
21
- "plugins/_lib/mail/networkPolicy.js": "0694a1ee174ea98410b76b99aa89e1a4bee9d3d1fffeaabb3262f232812f9e3a",
22
- "plugins/_lib/mail/imapPoolRuntime.js": "4aa5f1ea901f0a461b6253ce3c63c56c06558d41dc75d6b511e17278d637b647",
23
- "plugins/_lib/mail/publicMailbox.js": "02ce9383f6bc56d03a81b48261136f7ab1d379aa77d4527b1fb71b73bd7aa620",
24
- "plugins/_lib/mail/render.js": "984a9ec71343d795c00186213d6a11c34908b66ea712eba6632fc0fab914905a",
25
- "plugins/_lib/mail/unsubscribe.js": "c216be30ac3a70c9847b19a90eb7fd7f34daa3cf368f70e4b5dcc326609be915",
26
- "plugins/_lib/mail/unreadBadge.js": "56d83f73d1cf127c971bf2c3b08806cc39ce20c55c2bde75f8820c7145161a97",
27
- "plugins/_lib/mail/message-action.js": "bcc682e2b5d8b7943a16359ff938fa10109e11c2295ec3a54e93ec87b1b06f9a",
28
- "plugins/_lib/admin/mail/identity.js": "1931f8ea34a2746d01d64094a0fdd5c2b026b95d2e9ea2e5c928ced9537a3b40",
29
- "plugins/_lib/mail/messageSecurityProvider.js": "5358f9662e711a3b904460430937de022b6a5e8c5d61fa4d01aebf664a85367d",
30
- "plugins/_lib/mail/messageSecurity.js": "81b3427af0fec5bd1cbe3056d357b397f4e68a92e58ef9ebc30f03682889e7d4",
31
- "plugins/_lib/mail/smtpService.js": "ea2aa77aa2c28ab6abb243b56b264a00ac4cdcffe9022c33d22a769a1f38ad47",
32
- "plugins/_lib/mail/subscriptions.js": "ca4b68195129a62ae4213a3b04ef911fdab98951575ae8ece3979135e16f73a9",
33
- "plugins/_lib/mail/senderAuth.js": "953b7638dd0d90c480ce1294d67d11072bcbb6253fdcd7a3bd67f574958cf825",
34
- "plugins/_lib/mail/readRuntime.js": "86f95ca07fa85217036020517a8b9158ed1dd64557f01a04a37897e08b285734",
35
- "plugins/_lib/admin/mail/image-senders-section.js": "fb5c8ed3183854aff0ce68ffe0a7bc304997d114fda9a8310ced02ca8ad23ae0",
36
- "plugins/_lib/admin/mail/mail.html": "76a926fa5effef258b67d33a48935791de06853b608a06594143fe7efa5e1415",
37
- "plugins/_lib/admin/mail/section-kit.js": "c4bcd4cf0db2a2951c67da6ead01855bbde848cd6d7212bd1e250c212c4a19e3",
38
- "plugins/_lib/admin/mail/when-closed.js": "dd1dbda9969b3c2377d67e492b1b9cb408e9eaa6a5722d6affd7557840733eb1",
39
- "plugins/_lib/admin/mail/oauth-panel.js": "f5dafe658c53f1e75b7c95e77b1101e072dfe0bf6090cc8d66561ddda7aa419a",
40
- "plugins/_lib/admin/mail/rules.js": "bf149ad81fc02fac0aaa469f57327bddb26189127cb47e3b5ed1c216f20b0b42",
41
- "plugins/_lib/admin/mail/reader-kit.js": "8030a7a25f05f19926ff435187b35f1de4936eef9c69cded2cb067900a2d5bb8",
42
- "plugins/_lib/admin/mail/panes.js": "9d8ec696421e9db0e2e51425d9baccc5d2ce239556855a153240476483233cf7",
43
- "plugins/_lib/admin/mail/contacts.js": "a40cc9337ca2d6b8635b0ec8d0f0bc9921c50b0478dab92b69ffc03f22864dd0",
44
- "plugins/_lib/admin/mail/message-actions.js": "20c5d76395e4ac97e9676066f096fb99a5c02c0daa88e9d3a682f24ed8bf010e",
45
- "plugins/_lib/admin/mail/resizable.js": "ff54b2a738f87188b20eabf344aa7e493ab6d11e7553d90b367dace2d7a3efcf",
46
- "plugins/_lib/admin/mail/settings-section.js": "6ad552eab8188f0e38533cc4b8403b31bac2eca01485ababdc532afe99937895",
47
- "plugins/_lib/admin/mail/compose-window.js": "0ed5aea919182d0d857e4f398f321762c029b08f248f825dcf2f8d3eae0b8c6e",
48
- "plugins/_lib/admin/mail/folder-tree.js": "32040a83e8ef265ae99bad062caf10d8572b9a580a9e9d74da96b8778fbdeb9f",
49
- "plugins/_lib/admin/mail/body-menu.js": "080e7a008f24ad17edd8136385c52d45a6e3fde89444481010f9e8f720f68e22",
50
- "plugins/_lib/admin/mail/diagnostics-section.js": "8e0ad9853b529b26c11477829ec7b6a4d5e3f056960340046ef101022dd57b03",
51
- "plugins/_lib/admin/mail/drag-drop.js": "3e3dbae0aade8c8a17b0d9b16ca30ceb45ca37c9f904c5e8717d7977d5174909",
52
- "plugins/_lib/admin/mail/scheduling.js": "9e1aceee740b1b668842df0e70b6424bdc8cbf5d4cb6143340804e7ca0831daa",
53
- "plugins/_lib/admin/mail/font-controls.js": "2bf04cb9e8e179d7ad93e17692a421af560f4d96de9eb80086267612ec4b8782",
54
- "plugins/_lib/admin/mail/fonts.js": "81f71d2ee012e1fdb69607d543586a5f097dc0da9b33ca251ded604bd9493726",
55
- "plugins/_lib/admin/mail/keyboard.js": "a2e714cebc46ae32c6f9d1c5ec84a5526f4cffaa6b8343a0aae405365ab61d2e",
56
- "plugins/_lib/admin/mail/mail.css": "adbfec0de00c839e7ae071489f96017386a67557557b46513b0191f1342af4c5",
57
- "plugins/_lib/admin/mail/reader-view.js": "6ef72e7e0a2254c72eb6250f20ef1677817dfca0675dbfbc70d3ee65790c4819",
58
- "plugins/_lib/admin/mail/templates.js": "e943fc703d46aabe539e461b04eac480419cc12fefa294ff7d0a73bf542c3bb8",
59
- "plugins/_lib/admin/mail/security-note.js": "d493837372311bf5d1989406bb3e6792299638ed237d5d99226d53c316df4ff9",
60
- "plugins/_lib/admin/ui/dates.js": "e57e70651df306110d0108c3859465496902a118c5bf2329b6fd360b01b413cc",
61
- "plugins/_lib/mail/compose.js": "22c7a2869e64c6b06ef9fe00612e7c4e83331f75a6615c35e9154bf84d6427b4",
62
- "plugins/_lib/admin/mail/reader-runtime.js": "d942e73ad872a9ba5c0961fe1df68eb2f6317f55e8f855e79479c57484289a87",
63
- "plugins/_lib/admin/mail/host-context.js": "b2904b2ea7c4ee16ef1cbccc72b798ee22484c19a2dd0857b780424e7698234d",
64
- "plugins/_lib/admin/mail/cms-host.js": "8d286ce33fbccb3e73f58e394692c39b406973db22dd833423fd10a235194c01",
65
- "plugins/_lib/admin/ui/resizable.js": "aabc7eec6d41477fc5a78d0e0e180153ca5710bd65a549e744ed934b79fa31c6",
66
- "plugins/_lib/mail/store.js": "9190df9ca575b3191726361abfd87398fc762d9bada05aa1749b9a2a3c33bffd",
67
- "plugins/_lib/mail/syncSelection.js": "50f44b1f5db63ec024bdc12eaaf14974fb32b3409a6d3bb196937a604db4af10",
68
- "plugins/_lib/mail/pollerRuntime.js": "ec2f0315c8d6399a4ee38c037cb2a6d68a62dd1f1c8a264d4dca627fb64ffcfa",
69
- "plugins/_lib/mail/poller.js": "5e8dd4e8ea85ba7533c5662cba737efa580c51ab97245a807ffabc84379dac51",
70
- "plugins/_lib/mail/syncRuntime.js": "2d1ea996248797de80f32969f32c6b56dcaa45913dfeb54d04bf2baa5cf7ddb5",
71
- "plugins/_lib/mail/write.js": "296a7150af926ea64243e89cfa38ad81a3abfb46352572e4cfdad50ff7187ff4",
72
- "plugins/_lib/admin/mail/restore-spam.js": "f969d0cab522af550e25bf1b6a8300f860157f2c0c0d3a935b81323560d349e0",
73
- "plugins/_lib/mail/folders.js": "23bd427fa104026daedb2fd8c4254bd7d6c60080ee72fa615dee351c14020a35",
74
- "plugins/_lib/mail/folderActions.js": "7cf46d74edb420cec0146f361706979382121762cf72d8cd0d607e5d07660357",
75
- "plugins/_lib/mail/folderRuntime.js": "3dc54c9869bdaa5a519aa13852a641b09dbed6e0a7010f072b37a0bf544e85e5",
76
- "plugins/_lib/mail/ruleRunner.js": "62272c316f5156b93af8c60b60b259a46c097f4bab2b346b51e2868e0ce5a651",
77
- "plugins/_lib/mail/schedulerRuntime.js": "bc402c332836be84441526a8bde7a8e1ccd067297cd0e24f43bc0ae30de74bdb",
78
- "plugins/_lib/mail/snoozeRuntime.js": "7bf658092fe7091e7b6dc44bf26d90256ce82884e7a686071d101cd24aeea96e",
79
- "plugins/_lib/mail/vacationRuntime.js": "fca2a398620af7bee24cb9a407bd8972d2507acafb97ac4890c4a8fce3a4343e",
80
- "plugins/_lib/mail/mbox.js": "e236a6fa65b329a2a561f4612b67048798dcab31aaccdf5a67fb01c1c965e144",
81
- "plugins/_lib/mail/sieve.js": "9ede75a3d88f8e1b30bd3ff7211057d73414f8e68ecc0892a53e39f227aa905c",
82
- "plugins/_lib/mail/oauthRuntime.js": "c59992decdfdd54e36cfee3f17bb2394d20d001ba78a600906702a03197ba9e1",
83
- "plugins/_lib/mail/oauthRouteRuntime.js": "4fbc046dff78a013684b0ae55cb1f15b21f89e4fdb7969244e34b1d31c15b79b",
84
- "plugins/_lib/mail/oauthAccounts.js": "29950f251b1ce4337a1945c24156d3844da0196415b579bf48a9337b6a9e087c"
6
+ "plugins/_lib/mail/defaults.js": "f6c8869ddd2d4201f69d37d1c524e8b83ebc4efaa9d9f173407df32f21a9116c",
7
+ "plugins/_lib/mail/priority.js": "a051c2bb241a9e9e2e697604dea3943334d0b82a14c4148f5aa53ef758afdbd1",
8
+ "plugins/_lib/mail/envelope.js": "d2f5211d6a43e48e0f650a5bca4fcae4ca7a17aee381d9154ad011cbaff01e58",
9
+ "plugins/_lib/mail/pollSchedule.js": "d52edd793c678a62c0a3544ede56953a21433227763080e8de03d2cb1b14f8ce",
10
+ "plugins/_lib/mail/syncPlan.js": "58cf55a53d24efbe9ace9caf0729e845272a1a1dd347a29ca30e7e8fb89e5aec",
11
+ "plugins/_lib/admin/mail/threads.js": "beeeb5c2b63080813afdaaa244c35fa513d8a8bef0f72ad232edaa08de98fa67",
12
+ "plugins/_lib/admin/mail/vacation.js": "83168af79894fd9e75fb0ebb91942e4d1bff6d120f064512dee30cd2695cf64e",
13
+ "plugins/_lib/mail/secretProvider.js": "c85919db68bf18e9b390ecb27f3d66be2bb9dee5ebdee647df56fd7ecf18ae49",
14
+ "plugins/_lib/mail/secretbox.js": "f944fe6fc2fdde19c440ce09c4f004a52e5786277dda9dcd18b023e97c75e735",
15
+ "plugins/_lib/mail/bodyTokenProvider.js": "48d597edd8bc3a452c454184e7a4e0cf554029cf45a7d8c732212394bb004749",
16
+ "plugins/_lib/mail/bodyTokens.js": "6f443e36539e56cf3e8188636f633300ac5d4abfb726c2502aeb2e4935e012b6",
17
+ "plugins/_lib/mail/accountFileStore.js": "c28d0047b5ab907813e41b9218f68065d99e90e84ef30f2a212e3b724991569e",
18
+ "plugins/_lib/mail/accountRepository.js": "8046b89fd0ef9f4e42943447c0d6e9ca34dad71fea67b0677f7987f3f6675a01",
19
+ "plugins/_lib/mail/accountRoutes.js": "2aa92dc298e551968d28dd3213abb7ebc5e25c9a7f62138a3b3e55083e803938",
20
+ "plugins/_lib/mail/networkAddresses.js": "04b66e2261a5991e9473c4986775f4199e2001992223e10e6a55d01bcd061f6a",
21
+ "plugins/_lib/mail/networkPolicy.js": "21bdfa9a54e1bec2d55f9c5c6a97122ad9cb724e7427d0d859ea0ef9b6fb8fe7",
22
+ "plugins/_lib/mail/imapPoolRuntime.js": "8b180243a0e7fa36a7f085abed8aa2215f2068649e55daf76c76f7a5e764f42e",
23
+ "plugins/_lib/mail/publicMailbox.js": "e2ca2ce23c3a17b9f54241176271e49696fd5fceac356a89d7ebd696f50db393",
24
+ "plugins/_lib/mail/render.js": "93614843084b5e16dda29cfa79a70e389316b3c8235466f7dc54e1e0dd5c3e26",
25
+ "plugins/_lib/mail/unsubscribe.js": "efb4e815c24993a7f2a2aae7677cdef27e6b19422e4b8a353c7887f9960750d1",
26
+ "plugins/_lib/mail/unreadBadge.js": "40d503d32c900f4eee026a0704debf038ed459070ec975d5abcfc61e2265c541",
27
+ "plugins/_lib/mail/message-action.js": "e931b8525bfecb564786be4f629b3ef0d0390a087204afe149240e30de1db1a1",
28
+ "plugins/_lib/admin/mail/identity.js": "ad9e43a1aa1dedff99a96d880474c965d4ddecb3cc5a550c5220999a1987d4df",
29
+ "plugins/_lib/mail/messageSecurityProvider.js": "9a0a6815837199c3dbc6e039b5e18a8c0f34fd45b10382d05ab450cef2be165d",
30
+ "plugins/_lib/mail/messageSecurity.js": "74bbb0f3656d1a29211b455e9ab0590141984fcc447a9c44178fb9c2793a5187",
31
+ "plugins/_lib/mail/smtpService.js": "d64a156af7933692c7c7d61b627fe49429d3418c52c2aa518353a0329c1ae166",
32
+ "plugins/_lib/mail/subscriptions.js": "493987fdc659b59c13c6cc72df2b77c2edfeb699eca5c84770f74d54377512b8",
33
+ "plugins/_lib/mail/senderAuth.js": "83e0c3f645a9e6bbff055fe490b3980127fa90b7f5740eb53be2f98d81b3744a",
34
+ "plugins/_lib/mail/readRuntime.js": "e7c0f95966ea25d7e60824a32b0b2b38c74f263762f2944f006a70ee9ee4dbd3",
35
+ "plugins/_lib/admin/mail/image-senders-section.js": "d2998b75c825043491b8f8efb89e575c6df93a5ac34f07736493229ecaa19146",
36
+ "plugins/_lib/admin/mail/mail.html": "54dfc4fa59d31529503b8cd43895026415b4a6f1282343a056324042c90efc26",
37
+ "plugins/_lib/admin/mail/section-kit.js": "74c3cedab1718809364112b64756d8e19b5e5997c6acb663e289effaaf6d1b81",
38
+ "plugins/_lib/admin/mail/when-closed.js": "b0c149040af8a8f7658094913a9a270f79f1de537162e83be2db60ab3d204ae2",
39
+ "plugins/_lib/admin/mail/oauth-panel.js": "06ec04e341a7658f0221a130731f4ea312f24490c3d7d3e73969922123acedf9",
40
+ "plugins/_lib/admin/mail/rules.js": "20f258a21bbbb98226fd31eb8f443b6a221726176133ac43895b595ea0e602b1",
41
+ "plugins/_lib/admin/mail/reader-kit.js": "6e56b5f651bd6e8f0244c649d9530df077ca8f19161fe2b7a8d85d05fb2008c4",
42
+ "plugins/_lib/admin/mail/panes.js": "274654315aa16f8bcf608a3b6aea511a22cb0a0b75702281a268546f84c860f0",
43
+ "plugins/_lib/admin/mail/contacts.js": "cedb1210129fd0503f17eda3aba11c2254d58e2f2a45619d10d6a40f214729e3",
44
+ "plugins/_lib/admin/mail/message-actions.js": "2891436890c0a59172ecc6fda7eef8fb0c24290dc2c3feb71b0b00b5c7e524ca",
45
+ "plugins/_lib/admin/mail/resizable.js": "79bf3b0b0e38378e591d31f9149ca282618eeae688334f090d8a183b5cbc70a0",
46
+ "plugins/_lib/admin/mail/settings-section.js": "3c83d841b7bccee16d35379125ed12f855510cd082cb9f41c7e0e0085115ff91",
47
+ "plugins/_lib/admin/mail/compose-window.js": "c9f257371868bb4a86bfbcfc30ae62d7a25c3cfff31b5c29f96a5ed07525bd00",
48
+ "plugins/_lib/admin/mail/folder-tree.js": "6d421ab3c87be7a6c894b568ec4d3f15ba181a01ab0a2cefdf9bcbf1ca67c690",
49
+ "plugins/_lib/admin/mail/body-menu.js": "ff39986cb0e8e4cf746efbfd443ce53d598570324c79ef027112ee92e9f1486d",
50
+ "plugins/_lib/admin/mail/diagnostics-section.js": "593658341a9e57bf6379120e69c2c3ba0eec01b1e2850c8d8f77c63b55106fad",
51
+ "plugins/_lib/admin/mail/drag-drop.js": "51071cb5b9b2a4bc1020d39e7d2a2adcb73e2e9572d6a615435d97ceed702afb",
52
+ "plugins/_lib/admin/mail/scheduling.js": "37c0453ec36f397a400a8a1039ee4a8d32908ea026b104fb279f3167732cf763",
53
+ "plugins/_lib/admin/mail/font-controls.js": "385ad8a61a9606f1eb6200a379d5ba3b7fd7aa45bafb6fdeb358a8a5d91dd7a2",
54
+ "plugins/_lib/admin/mail/fonts.js": "0c9966d71e2a944e8381353770894a7642140a7b3d2f0155530fabded81ef4d2",
55
+ "plugins/_lib/admin/mail/keyboard.js": "3020634229892cfb9742b537911e2e6d569741f3969bc41fe87456612652445a",
56
+ "plugins/_lib/admin/mail/mail.css": "33820ffc73fb4dd982e98f3460d1fc23197d09e728d221a58f997a3c696d2620",
57
+ "plugins/_lib/admin/mail/reader-view.js": "49adebdf7ebb2dbee129a835f440e7e007533c4352b0d6b23c3675185fc03f5f",
58
+ "plugins/_lib/admin/mail/templates.js": "6255bcea0b5240551fa25c2555b7d4bd1d05658b09978c17534e8b5438827011",
59
+ "plugins/_lib/admin/mail/security-note.js": "6835955f7f81a66f3cdc19f125e758583578d5f6e6fddddd89206b96f3b5cf9c",
60
+ "plugins/_lib/admin/ui/dates.js": "f7149f6ee63b74ea700a1899e2b0a918fca6dcf42c855fbf05d055dc6ddf6ab1",
61
+ "plugins/_lib/mail/compose.js": "2e4748741a91ca6ac79e243e955f843800b2ece8e6348901fdc178fd41ea7deb",
62
+ "plugins/_lib/admin/mail/reader-runtime.js": "654747e0e05ff972d2ef4d6cbfc1cac9a3acad6dc8be7a4b973cdffb33d9a56b",
63
+ "plugins/_lib/admin/mail/host-context.js": "d9bf4da66ba8071dfc0733b0210547a0f82dc10584ec66b7f26de8aa542ba697",
64
+ "plugins/_lib/admin/mail/cms-host.js": "8ad7fb0b1f66683865d33515d76a51d1af69225b21e7905d885da3c8b7c9ec46",
65
+ "plugins/_lib/admin/ui/resizable.js": "46ff7cfa06d3374b92a429980dc15ca308d65ff08431fcea36c1d247435352be",
66
+ "plugins/_lib/mail/store.js": "64b09e8ce89966842f8b6840742c0ed74440b3e6418ada4b737e3722a00c4fa5",
67
+ "plugins/_lib/mail/syncSelection.js": "9b2b046aadf38341495536f18b0a286a3c5fa740a408ef71122b73001d7aad9b",
68
+ "plugins/_lib/mail/pollerRuntime.js": "c5440e16d04e8f40ab8811bfad59737c017e8f66fbe059835fc4dbb6e373fcaa",
69
+ "plugins/_lib/mail/poller.js": "cd0f6c2a50233ad919ae9a53b40e1017f79cb50731272c85be130f7b02fed444",
70
+ "plugins/_lib/mail/syncRuntime.js": "7e7c9976d55d9d1f9a9f5c203f7792ad72ff9f4da9c4c6c8cff917892cf09edb",
71
+ "plugins/_lib/mail/write.js": "5b16e0d05ed1f0c972b5690986391e536bac7d0b1f9a23a1a1678f7c78ab9f29",
72
+ "plugins/_lib/admin/mail/restore-spam.js": "7041a52cb8c02d8553aa91bcdcc12555f29631c7802b9065349c25a838ba719e",
73
+ "plugins/_lib/mail/folders.js": "9d80f64804056adc21683302e92bf2974878645ada49c800edaa502b9496f6e8",
74
+ "plugins/_lib/mail/folderActions.js": "c706bf31479ebf908e16168afef2d459acdd2181e8617f2c4c8a6744aadae437",
75
+ "plugins/_lib/mail/folderRuntime.js": "c20bdc25b12a7632c89f385a16c7fd9384777347eb3077694dfd233bce6a2043",
76
+ "plugins/_lib/mail/ruleRunner.js": "7524e8f476e2ff6fcdf390c6f8997d983e6fe4f1b32747582bae5f429ef20864",
77
+ "plugins/_lib/mail/schedulerRuntime.js": "20c92f02e851239d1a313b7dd58ad096d2c3965e228b9dce49555181fc6db8ed",
78
+ "plugins/_lib/mail/snoozeRuntime.js": "35721de025ed76253c67a8bb7e2dde420f2abc6ab05535d4d6ab430efc2fe76a",
79
+ "plugins/_lib/mail/vacationRuntime.js": "51be0478c7305877af45ca78e846636e9a4cab2d681f5ae550c7937af95b72e2",
80
+ "plugins/_lib/mail/mbox.js": "35a6f3797e72e6017256bd78f8e90afad7595608103b9158a042eb4bc88195b2",
81
+ "plugins/_lib/mail/sieve.js": "160eeb9c3345ee8e0ea27f1ae63d18d3ced0050fe0f41e57420a7e16a365ab27",
82
+ "plugins/_lib/mail/oauthRuntime.js": "2942b0fe45f6e337ad9640b6533327cb10b8c21e3a8ab63f66657e59500ee2c5",
83
+ "plugins/_lib/mail/oauthRouteRuntime.js": "6770b6bb223fbc399749e11978b59ab5b92ad02616970e17343fcd87901c4d4b",
84
+ "plugins/_lib/mail/oauthAccounts.js": "3eda5e56adb2097b41c56df89a698dcd7737cab54513d2b201fa2aa787f7c1e2"
85
85
  }
86
86
  }
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/accountFileStore.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/accountFileStore.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {randomUUID} from 'node:crypto';
4
4
  import fs from 'node:fs/promises';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/accountRepository.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/accountRepository.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  export const POLL_INTERVALS = Object.freeze([3, 5, 10, 15]);
4
4
  import {randomUUID} from 'node:crypto';
@@ -519,6 +519,26 @@ export function createAccountRepository({store, secrets, isOAuth = account => ac
519
519
  });
520
520
  }
521
521
 
522
+ /** Persist the owner's notification folder selection without changing other preferences. */
523
+ async function setNotificationFolders(userId, accountId, selection) {
524
+ return withStoreLock(async () => {
525
+ const all = await readAll();
526
+ const index = all.findIndex(a => a.id === accountId && a.userId === userId);
527
+ if (index === -1) return null;
528
+ const previous = all[index].notificationFolders;
529
+ const folders = [...new Set(selection.folders)].sort();
530
+ const unchanged = previous?.mode === selection.mode
531
+ && JSON.stringify([...(previous.folders ?? [])].sort()) === JSON.stringify(folders);
532
+ all[index] = {...all[index], notificationFolders: {
533
+ mode: selection.mode,
534
+ folders,
535
+ revision: unchanged ? previous.revision : randomUUID()
536
+ }, updatedAt: new Date().toISOString()};
537
+ await writeAll(all);
538
+ return all[index];
539
+ });
540
+ }
541
+
522
542
  async function listAllAccounts() { return readAll(); }
523
543
 
524
544
  /** Replace stored compose profiles in the same transaction queue as credentials. */
@@ -635,6 +655,7 @@ export function createAccountRepository({store, secrets, isOAuth = account => ac
635
655
  const rewrite = path => mapping.has(path) ? mapping.get(path) : path;
636
656
  const account = {...all[index]};
637
657
  if (Array.isArray(account.syncFolders)) account.syncFolders = [...new Set(account.syncFolders.map(rewrite).filter(path => path !== null))];
658
+ if (Array.isArray(account.notificationFolders?.folders)) account.notificationFolders = {...account.notificationFolders, folders: [...new Set(account.notificationFolders.folders.map(rewrite).filter(path => path !== null))]};
638
659
  if (Array.isArray(account.ruleFolders)) account.ruleFolders = [...new Set(account.ruleFolders.map(rewrite).filter(path => path !== null))];
639
660
  if (Array.isArray(account.rules)) account.rules = account.rules.map(rule => {
640
661
  const missing = (rule.actions ?? []).some(action => mapping.has(action.folder) && rewrite(action.folder) === null);
@@ -647,5 +668,5 @@ export function createAccountRepository({store, secrets, isOAuth = account => ac
647
668
  return all[index];
648
669
  });
649
670
  }
650
- return {sieveToPublic, setSieve, vacationToPublic, sendingAddresses, setVacation, snoozeFolder, undoSendSeconds, setSendingOptions, rulesToPublic, ruleGroupsToPublic, rulesToRun, ruleFolders, setRules, rewriteFolderPaths, setIdentities, setTemplates, listAllAccounts, setPollInterval, setSyncFolders, isOAuth, validate, listAccounts, setDefaultAccount, getAccount, saveAccount, deleteAccount, deleteAccountsForUser, pruneOrphans, toConnection, setSmtp, toSmtpConnection, smtpToPublic, trustImageSender, untrustImageSender, setRememberImageSenders, sendersImagesTrusted, setContactImages, contactImagesAllowed};
671
+ return {sieveToPublic, setSieve, vacationToPublic, sendingAddresses, setVacation, snoozeFolder, undoSendSeconds, setSendingOptions, rulesToPublic, ruleGroupsToPublic, rulesToRun, ruleFolders, setRules, rewriteFolderPaths, setIdentities, setTemplates, listAllAccounts, setPollInterval, setSyncFolders, setNotificationFolders, isOAuth, validate, listAccounts, setDefaultAccount, getAccount, saveAccount, deleteAccount, deleteAccountsForUser, pruneOrphans, toConnection, setSmtp, toSmtpConnection, smtpToPublic, trustImageSender, untrustImageSender, setRememberImageSenders, sendersImagesTrusted, setContactImages, contactImagesAllowed};
651
672
  }
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/accountRoutes.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/accountRoutes.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {MailKeyError} from './secretProvider.js';
4
4
 
@@ -472,7 +472,7 @@ export async function setComposeOptions(userId, accountId, options) {
472
472
 
473
473
  /** Account lifecycle is authored in domma-mail/packages/core/src/mail/accountRepository.js. */
474
474
  export const {
475
- sieveToPublic, setSieve, vacationToPublic, sendingAddresses, setVacation, snoozeFolder, undoSendSeconds, setSendingOptions, rulesToPublic, ruleGroupsToPublic, rulesToRun, ruleFolders, setRules, rewriteFolderPaths, setIdentities, setTemplates, listAllAccounts, setPollInterval, setSyncFolders, validate, listAccounts, setDefaultAccount, getAccount, saveAccount,
475
+ sieveToPublic, setSieve, vacationToPublic, sendingAddresses, setVacation, snoozeFolder, undoSendSeconds, setSendingOptions, rulesToPublic, ruleGroupsToPublic, rulesToRun, ruleFolders, setRules, rewriteFolderPaths, setIdentities, setTemplates, listAllAccounts, setPollInterval, setSyncFolders, setNotificationFolders, validate, listAccounts, setDefaultAccount, getAccount, saveAccount,
476
476
  deleteAccount, deleteAccountsForUser, pruneOrphans, toConnection,
477
477
  setSmtp, toSmtpConnection, smtpToPublic, trustImageSender, untrustImageSender, setRememberImageSenders, sendersImagesTrusted, setContactImages, contactImagesAllowed
478
478
  } = baseAccounts;
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/bodyTokenProvider.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/bodyTokenProvider.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {createHmac, timingSafeEqual} from 'node:crypto';
4
4
 
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/bodyTokens.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/bodyTokens.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** CMS compatibility entry point for the existing iframe grant API. */
4
4
  import {resolveKeySource} from './secretbox.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/compose.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/compose.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Turning a message into a reply, and a reply into something sendable.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/defaults.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/defaults.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Reading defaults, shared by every edition.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/envelope.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/envelope.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The shape the mirror holds one message in.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/folderActions.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/folderActions.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Whole-folder operations use a snapshot of UIDs, never the visible page or a moving '*'. */
4
4
  import {moveBulk, setFlagsBulk} from './write.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/folderRuntime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/folderRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Portable folder operations. Hosts supply ownership, serialization and metadata updates. */
4
4
  import {validateFolderName, buildFolderPath, renameTarget, canModifyFolder, descendantsOf, moveTarget, resolveSubscriptions} from './folders.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/folders.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/folders.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {resolveSubscriptions} from './subscriptions.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/imapPoolRuntime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/imapPoolRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * IMAP connection pool for the Mail Reader plugin.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/mbox.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/mbox.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Exporting a folder as mbox.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/message-action.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/message-action.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Remember replies and forwards on the original message after delivery. */
4
4
  export const SOURCE_HEADER = 'X-Domma-Message-Source';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/messageSecurity.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/messageSecurity.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {createMessageSecurity} from './messageSecurityProvider.js';
4
4
  export const {setMessageSecurity, canProtect, protectRaw, protectDraftRaw, unwrapRaw, parseReadable} = createMessageSecurity();
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/messageSecurityProvider.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/messageSecurityProvider.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Where signing and encryption plug into the mail core.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/networkAddresses.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/networkAddresses.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Address classification from the CMS outbound policy, MIT licensed. */
4
4
  import net from 'node:net';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/networkPolicy.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/networkPolicy.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import dns from 'node:dns/promises';
4
4
  import net from 'node:net';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/oauthAccounts.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/oauthAccounts.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {randomUUID} from 'node:crypto';
4
4
  import {MailKeyError} from './secretProvider.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/oauthRouteRuntime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/oauthRouteRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The OAuth2 sign-in routes for mailboxes: Connect, the provider's callback,
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/oauthRuntime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/oauthRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * OAuth2 sign-in for mailboxes (XOAUTH2) - Microsoft 365 / Outlook.com and Gmail.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/pollSchedule.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/pollSchedule.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Deciding which mailboxes are due a poll.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/poller.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/poller.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Compatibility entry point for the shared mail poller. */
4
4
  export {createPoller} from './pollerRuntime.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/pollerRuntime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/pollerRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The background poller.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/priority.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/priority.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * How urgent a sender said a message was.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/publicMailbox.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/publicMailbox.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Standalone mailbox summary. Explicit fields keep credentials out of responses. */
4
4
  export function publicMailbox(account) {
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/readRuntime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/readRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {registerAccountRoutes} from './accountRoutes.js';
4
4
  import {ENVELOPE_QUERY, hasAttachment, parseHeaderBlock} from './envelope.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/render.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/render.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Message rendering for the Mail Reader plugin.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/ruleRunner.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/ruleRunner.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Carrying out what the rules decided.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/schedulerRuntime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/schedulerRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The worker behind "send later", "undo send" and "snooze".
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/secretProvider.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/secretProvider.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {createCipheriv, createDecipheriv, createHash, randomBytes, scryptSync} from 'node:crypto';
4
4
  import fs from 'node:fs';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/secretbox.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/secretbox.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** CMS compatibility entry point. Standalone hosts create their own secret box. */
4
4
  import path from 'node:path';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/senderAuth.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/senderAuth.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Did this message really come from the address in its From line?
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/sieve.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/sieve.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** ManageSieve (RFC 5804). One bounded, TLS-verified session per operation. */
4
4
  import net from 'node:net';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/smtpService.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/smtpService.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Sending, and keeping a copy where the rest of your clients will find it.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/snoozeRuntime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/snoozeRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {safeWritePool, moveMessage} from './write.js';
4
4
 
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/store.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/store.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The synchronised message store.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/subscriptions.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/subscriptions.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  export function resolveSubscriptions(boxes) {
4
4
  const list = boxes ?? [];
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/syncPlan.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/syncPlan.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Deciding what a folder sync needs to do.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/syncRuntime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/syncRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {missingUids, planFolderSync} from './syncPlan.js';
4
4
  import {resolveSyncFolders} from './syncSelection.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/syncSelection.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/syncSelection.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Which folders a mailbox keeps mirrored.
@@ -37,13 +37,18 @@ const DEFAULT_SPECIAL_USE = new Set(['\\Inbox', '\\Sent']);
37
37
  export function resolveSyncFolders(account, folders) {
38
38
  const available = new Set(folders.map(f => f.path));
39
39
 
40
+ // Notification folders need current envelopes even when they were not
41
+ // selected for search. Resolve against the live list to include new folders.
42
+ const notification = account?.notificationFolders;
43
+ const notified = notification?.mode === 'all' ? [...available]
44
+ : notification?.mode === 'selected' ? (notification.folders ?? []).filter(path => available.has(path)) : [];
40
45
  const chosen = account?.syncFolders;
41
46
  if (Array.isArray(chosen)) {
42
47
  // Deduplicated here as well as on write: a record could carry
43
48
  // duplicates from an older version or an edited file, and each one
44
49
  // would otherwise mean syncing the same folder twice every pass.
45
50
  return {
46
- paths: [...new Set(chosen.filter(path => available.has(path)))],
51
+ paths: [...new Set([...chosen.filter(path => available.has(path)), ...notified])],
47
52
  source: 'explicit'
48
53
  };
49
54
  }
@@ -61,7 +66,7 @@ export function resolveSyncFolders(account, folders) {
61
66
  paths.push(first.path);
62
67
  }
63
68
 
64
- return {paths: [...new Set(paths)], source: 'default'};
69
+ return {paths: [...new Set([...paths, ...notified])], source: 'default'};
65
70
  }
66
71
 
67
72
  /**
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/unreadBadge.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/unreadBadge.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The free reader's sidebar badge - unread mail in each mailbox's INBOX.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/unsubscribe.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/unsubscribe.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Getting off a mailing list.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/vacationRuntime.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/vacationRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {randomUUID} from 'node:crypto';
4
4
  import {autoReplyHeaders, isActive, normaliseVacation, replySubject, shouldAutoReply, replyHistory} from '../admin/mail/vacation.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.20.0, packages/core/src/mail/write.js.
1
+ // Source: @domma-mail/core 0.21.0, packages/core/src/mail/write.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Changing mail, rather than reading it.