@bobfrankston/rmfmail 1.1.30 → 1.1.32
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/client/android-bootstrap.bundle.js +8 -6
- package/client/android-bootstrap.bundle.js.map +2 -2
- package/package.json +7 -7
- package/packages/mailx-imap/index.d.ts.map +1 -1
- package/packages/mailx-imap/index.js +22 -10
- package/packages/mailx-imap/index.js.map +1 -1
- package/packages/mailx-imap/index.ts +23 -11
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-store-web/android-bootstrap.d.ts.map +1 -1
- package/packages/mailx-store-web/android-bootstrap.js +12 -7
- package/packages/mailx-store-web/android-bootstrap.js.map +1 -1
- package/packages/mailx-store-web/android-bootstrap.ts +12 -7
- package/packages/mailx-store-web/package.json +1 -1
- package/packages/mailx-store-web/sync-manager.d.ts.map +1 -1
- package/packages/mailx-store-web/sync-manager.js +10 -1
- package/packages/mailx-store-web/sync-manager.js.map +1 -1
- package/packages/mailx-store-web/sync-manager.ts +10 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-61436 → node_modules.npmglobalize-stash-34180}/.package-lock.json +0 -0
|
@@ -239,10 +239,19 @@ export class SyncManager implements WebSyncManager {
|
|
|
239
239
|
if (msg.answered) flags.push("\\Answered");
|
|
240
240
|
if (msg.draft) flags.push("\\Draft");
|
|
241
241
|
const bodyPath = msg.providerId ? `gmail:${msg.providerId}` : "";
|
|
242
|
+
// `messages.date` is NOT NULL. An unparseable envelope date
|
|
243
|
+
// yields an *Invalid Date* — truthy, `instanceof Date`, but
|
|
244
|
+
// `.getTime()` is NaN, which binds as NULL and fails the
|
|
245
|
+
// constraint, aborting the whole batch. Default any non-finite
|
|
246
|
+
// value to now.
|
|
247
|
+
const dateRaw = msg.date instanceof Date ? msg.date.getTime()
|
|
248
|
+
: typeof msg.date === "number" ? msg.date
|
|
249
|
+
: NaN;
|
|
250
|
+
const dateMs = Number.isFinite(dateRaw) ? dateRaw : Date.now();
|
|
242
251
|
this.db.upsertMessage({
|
|
243
252
|
accountId, folderId, uid: msg.uid,
|
|
244
253
|
messageId: msg.messageId || "", inReplyTo: "", references: [],
|
|
245
|
-
date:
|
|
254
|
+
date: dateMs,
|
|
246
255
|
subject: msg.subject || "",
|
|
247
256
|
from: toEmailAddress(msg.from?.[0]),
|
|
248
257
|
to: msg.to.map((a: any) => toEmailAddress(a)),
|