@social-mail/social-mail-web-server 1.8.456 → 1.8.457
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/dist/server/services/emails/IndexEmailService.d.ts +1 -1
- package/dist/server/services/emails/IndexEmailService.d.ts.map +1 -1
- package/dist/server/services/emails/IndexEmailService.js +3 -3
- package/dist/server/services/emails/IndexEmailService.js.map +1 -1
- package/dist/server/workflows/email/index/IndexEmailTextContentWorkflow.d.ts +1 -0
- package/dist/server/workflows/email/index/IndexEmailTextContentWorkflow.d.ts.map +1 -1
- package/dist/server/workflows/email/index/IndexEmailTextContentWorkflow.js +1 -1
- package/dist/server/workflows/email/index/IndexEmailTextContentWorkflow.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/server/services/emails/IndexEmailService.ts +3 -3
- package/src/server/workflows/email/index/IndexEmailTextContentWorkflow.ts +2 -2
package/package.json
CHANGED
|
@@ -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
|
|
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);
|