@social-mail/social-mail-web-server 1.8.456 → 1.8.458

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.456",
3
+ "version": "1.8.458",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -17,7 +17,7 @@ export default async function seedUI(config: DBConfig) {
17
17
  await config.saveVersion(UIPackageConfig, {
18
18
  package: "@social-mail/social-mail-client",
19
19
  view: "dist/web/AppIndex",
20
- version: "1.9.92"
20
+ version: "1.9.93"
21
21
  });
22
22
 
23
23
  await config.saveVersion(WebComponentsPackageConfig, {
@@ -16,15 +16,15 @@ export default class IndexEmailService {
16
16
  @Inject
17
17
  tempFileService: TempFileService;
18
18
 
19
- async indexEmail({ emailID, textBody }: Partial<Email>) {
19
+ async indexEmail({ emailID, subject, textBody }: Partial<Email>) {
20
20
 
21
21
  // delete all search email tokens if exists
22
22
  const { db } = this;
23
23
 
24
- let text = "";
24
+ let text = subject || "";
25
25
 
26
26
  if(textBody) {
27
- text = textBody;
27
+ text += " " + textBody;
28
28
  }
29
29
 
30
30
  // for all attachments...
@@ -33,7 +33,7 @@ export default class IndexEmailTextContentWorkflow extends Workflow {
33
33
  const pending = await db.emails.where(void 0, (p) => (x) => x.searchIndexed === false
34
34
  && x.statePostReceiveInvoked === true)
35
35
  .orderByDescending(void 0, (p) => (x) => x.emailID)
36
- .map(void 0, (p) => (x) => ({ emailID: x.emailID, textBody: x.textBody}))
36
+ .map(void 0, (p) => (x) => ({ emailID: x.emailID, subject: x.subject, textBody: x.textBody}))
37
37
  .limit(200)
38
38
  .toArray();
39
39
 
@@ -57,7 +57,7 @@ export default class IndexEmailTextContentWorkflow extends Workflow {
57
57
  }
58
58
  }
59
59
 
60
- async indexEmail(email: { emailID: number; textBody: string; }) {
60
+ async indexEmail(email: { emailID: number; subject: string, textBody: string; }) {
61
61
  using scope = ServiceProvider.createScope(this.context);
62
62
  const db = scope.resolve(SocialMailContext);
63
63
  const indexService = scope.resolve(IndexEmailService);