@bobfrankston/mailx-imap 0.1.50 → 0.1.51

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 (2) hide show
  1. package/index.js +9 -2
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -3039,7 +3039,13 @@ export class ImapManager extends EventEmitter {
3039
3039
  console.log(` [api] ${accountId}: flags synced UID ${action.uid}`);
3040
3040
  }
3041
3041
  else if ((action.action === "delete" || action.action === "trash") && api.trashMessage) {
3042
- await api.trashMessage(folder.path, action.uid);
3042
+ // Pass the stored Gmail message id (provider_id) so
3043
+ // the provider doesn't fall back to its capped
3044
+ // list-and-hash search — that search misses any
3045
+ // message past the most-recent ~1000 in a large
3046
+ // mailbox, fails, and the deletion un-happens.
3047
+ const env = this.db.getMessageByUid(accountId, action.uid);
3048
+ await api.trashMessage(folder.path, action.uid, env?.providerId);
3043
3049
  console.log(` [api] ${accountId}: trashed UID ${action.uid} from ${folder.path}`);
3044
3050
  }
3045
3051
  else if (action.action === "move" && api.moveMessage) {
@@ -3050,7 +3056,8 @@ export class ImapManager extends EventEmitter {
3050
3056
  this.db.completeSyncAction(action.id);
3051
3057
  continue;
3052
3058
  }
3053
- await api.moveMessage(folder.path, action.uid, target.path);
3059
+ const env = this.db.getMessageByUid(accountId, action.uid);
3060
+ await api.moveMessage(folder.path, action.uid, target.path, env?.providerId);
3054
3061
  console.log(` [api] ${accountId}: moved UID ${action.uid} ${folder.path} → ${target.path}`);
3055
3062
  }
3056
3063
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@bobfrankston/mailx-types": "^0.1.14",
12
+ "@bobfrankston/mailx-types": "^0.1.15",
13
13
  "@bobfrankston/mailx-settings": "^0.1.17",
14
14
  "@bobfrankston/mailx-store": "^0.1.28",
15
15
  "@bobfrankston/iflow-direct": "^0.1.50",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  ".transformedSnapshot": {
39
39
  "dependencies": {
40
- "@bobfrankston/mailx-types": "^0.1.14",
40
+ "@bobfrankston/mailx-types": "^0.1.15",
41
41
  "@bobfrankston/mailx-settings": "^0.1.17",
42
42
  "@bobfrankston/mailx-store": "^0.1.28",
43
43
  "@bobfrankston/iflow-direct": "^0.1.50",