@social-mail/social-mail-web-server 1.8.463 → 1.8.465

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.8.463",
3
+ "version": "1.8.465",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -76,7 +76,7 @@ export type emailStatusType = typeof emailStatuses[number];
76
76
  })
77
77
  @Index({
78
78
  name: "IX_Email_Pending_Search",
79
- columns: [{ name: (x) => x.searchIndexed, descending: false }],
79
+ columns: [{ name: (x) => x.emailID, descending: true }],
80
80
  filter: (x) => x.searchIndexed === false && x.statePostReceiveInvoked === true
81
81
  })
82
82
  export class Email {
@@ -23,6 +23,11 @@ export type devicePushType = typeof devicePushTypes[number];
23
23
  ],
24
24
  filter: (x) => x.invalid === false && x.deviceTokenType !== null
25
25
  })
26
+ @Index({
27
+ name: "IX_LoginSessions_ActiveSessions",
28
+ columns: [ { name: (x) => x.expiry, descending: false }],
29
+ filter: (x) => x.invalid === false
30
+ })
26
31
  export default class LoginSession {
27
32
 
28
33
  @Column({ key: true, generated: "identity"})
@@ -95,7 +95,7 @@ export default class DailyWorkflow extends Workflow<any,any> {
95
95
 
96
96
  // deactivate all expired sessions...
97
97
  await db.loginSessions
98
- .where(void 0, (p) => (x) => x.expiry <= (Sql.date.now()))
98
+ .where(void 0, (p) => (x) => x.expiry <= (Sql.date.now()) && x.invalid === false)
99
99
  .limit(1000)
100
100
  .update(void 0, (p) => (x) => ({ invalid: true }));
101
101