@remit/imap-worker 0.0.96 → 1.0.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.
@@ -14,7 +14,7 @@ const unfiledAppendRefused = (fullPath, error) => error instanceof OutboxAttachm
14
14
  : `Sent, but not filed: the mail server refused to store a copy in ${fullPath} (${error instanceof Error ? error.message : String(error)}).`;
15
15
  export const handleAppendSentMessage = async (event, ctx, receiveCount) => {
16
16
  const { log, pool, config } = ctx;
17
- const { account: accountService, outboxMessage: outboxMessageService, outboxAttachment: outboxAttachmentService, mailboxSpecialUse: mailboxSpecialUseService, secrets, } = ctx.client;
17
+ const { account: accountService, outboxMessage: outboxMessageService, outboxAttachment: outboxAttachmentService, outboxSchedulingPart: schedulingPartService, mailboxSpecialUse: mailboxSpecialUseService, secrets, } = ctx.client;
18
18
  const { accountId, outboxMessageId } = event;
19
19
  log.info({ event: event.type, accountId, outboxMessageId }, "Handling event");
20
20
  const account = await accountService.get(accountId);
@@ -99,7 +99,7 @@ export const handleAppendSentMessage = async (event, ctx, receiveCount) => {
99
99
  await scope
100
100
  .getConnection()
101
101
  .then(async (connection) => {
102
- const rawMessage = await renderRawMessage(buildMailMessage(outbox, attachments));
102
+ const rawMessage = await renderRawMessage(buildMailMessage(outbox, attachments, await schedulingPartService.find(outboxMessageId)));
103
103
  const result = await connection.append(sentMailbox.fullPath, rawMessage, ["\\Seen"]);
104
104
  log.info({
105
105
  outboxMessageId,
@@ -113,7 +113,12 @@ export const syncMessageBody = async (event, ctx, receiveCount) => {
113
113
  }, { flagQueueService },
114
114
  // An invitation becomes a card the first time the message is seen,
115
115
  // alongside the filters that run on the same pass (issue #1033).
116
- { calendarSuggestionService, calendarStore, filterService });
116
+ {
117
+ calendarSuggestionService,
118
+ calendarStore,
119
+ filterService,
120
+ accountService,
121
+ });
117
122
  // Guard at the openBox choke point (epic #1281 invariants 3 & 5). The
118
123
  // served UIDVALIDITY is only knowable by opening the box, which only a
119
124
  // genuine fetch needs — BodySyncService.syncBodies skips connecting
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/imap-worker",
3
- "version": "0.0.96",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "exports": {