@remit/imap-worker 0.0.78 → 0.0.80

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/imap-worker",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -133,7 +133,12 @@ const handleCreate = async (
133
133
  .then((result) => {
134
134
  if (result.success) {
135
135
  log.info(
136
- { accountId, mailboxId, path },
136
+ {
137
+ accountId,
138
+ mailboxId,
139
+ path,
140
+ existingMailboxId: result.existing?.mailboxId,
141
+ },
137
142
  "Mailbox created on IMAP",
138
143
  );
139
144
  } else {
@@ -227,7 +227,10 @@ describe("syncMessageBody — DLQ propagation (integrated, #1270)", () => {
227
227
  setClient({
228
228
  account: { get: async () => cappedAccount() },
229
229
  mailbox: { get: async () => cappedMailbox() },
230
- mailboxSpecialUse: {},
230
+ mailboxSpecialUse: {
231
+ findJunkMailbox: async () => null,
232
+ findInboxMailbox: async () => null,
233
+ },
231
234
  message: {},
232
235
  threadMessage: {},
233
236
  address: {},
@@ -11,6 +11,7 @@ import {
11
11
  PlacementMoveService,
12
12
  QuarantineService,
13
13
  resolveExhaustedBodySyncFailures,
14
+ resolveFolderPlacement,
14
15
  } from "@remit/mailbox-service";
15
16
  import { buildFilterConfig } from "@remit/mailbox-service/filter-config";
16
17
  import { attemptBudget } from "@remit/sqs-client/attempt-budget";
@@ -272,12 +273,21 @@ export const syncMessageBody = async (
272
273
  // Both the sync attempt AND the retry-exhaustion resolution below run
273
274
  // against the SAME borrowed connection, so the mailbox stays open
274
275
  // across the two — the connection is only released once both are done.
276
+ const folder = {
277
+ fullPath: mailbox.fullPath,
278
+ placement: await resolveFolderPlacement(
279
+ mailboxSpecialUseService,
280
+ accountId,
281
+ mailbox.mailboxId,
282
+ ),
283
+ };
284
+
275
285
  await (async () => {
276
286
  const result = await bodySyncService.syncBodies(
277
287
  messageIds,
278
288
  accountId,
279
289
  account.accountConfigId,
280
- mailbox.fullPath,
290
+ folder,
281
291
  getConnectionChecked,
282
292
  force,
283
293
  );