@social-mail/social-mail-web-server 1.4.737 → 1.4.739

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": "@social-mail/social-mail-web-server",
3
- "version": "1.4.737",
3
+ "version": "1.4.739",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -9,7 +9,7 @@ export default class RepairEmailCountsWorkflow extends Workflow<{ mailboxID? }>
9
9
  let start = 0;
10
10
  do{
11
11
  start = await this.queueForAll(start);
12
- } while(start);
12
+ } while(BigInt(start));
13
13
  return;
14
14
  }
15
15
 
@@ -17,14 +17,14 @@ export default class RepairEmailCountsWorkflow extends Workflow<{ mailboxID? }>
17
17
  let start = 0;
18
18
  do {
19
19
  start = await this.updateLastReplyID(start);
20
- } while(start);
20
+ } while(BigInt(start));
21
21
  }
22
22
 
23
23
  if (this.input) {
24
24
  let start = 0;
25
25
  do {
26
26
  start = await this.computeContacts(start);
27
- } while(start);
27
+ } while(BigInt(start));
28
28
 
29
29
  await this.saveResults();
30
30
  }
@@ -65,6 +65,7 @@ export default class RepairEmailCountsWorkflow extends Workflow<{ mailboxID? }>
65
65
  }
66
66
  for (const iterator of list) {
67
67
  const { emailID } = iterator ;
68
+ start = emailID;
68
69
  const lastReply = await db.emails.where(iterator, (p) => (x) => x.threadID === p.emailID)
69
70
  .orderByDescending(void 0, (p) => (x) => x.emailID)
70
71
  .first();
@@ -72,7 +73,6 @@ export default class RepairEmailCountsWorkflow extends Workflow<{ mailboxID? }>
72
73
  if (lastReplyID !== iterator.lastReplyID) {
73
74
  await db.emails.statements.update({ lastReplyID }, { emailID });
74
75
  }
75
- start = emailID;
76
76
  }
77
77
  return start;
78
78
  }
@@ -98,6 +98,7 @@ export default class RepairEmailCountsWorkflow extends Workflow<{ mailboxID? }>
98
98
  }
99
99
  for (const iterator of list) {
100
100
  const { mailboxID, emailAddressID, autoClose, blocked } = iterator;
101
+ start = mailboxID;
101
102
  if (autoClose || blocked) {
102
103
  await db.mailboxContacts.statements.update({
103
104
  totalThreads: 0,
@@ -115,7 +116,6 @@ export default class RepairEmailCountsWorkflow extends Workflow<{ mailboxID? }>
115
116
  openThreads: x.lastReplyID === null ? 1 : 0
116
117
  }));
117
118
  await db.mailboxContacts.statements.update(all, { mailboxID, emailAddressID});
118
- start = mailboxID;
119
119
  }
120
120
  return start;
121
121
  }