@social-mail/social-mail-client 1.2.91 → 1.2.93
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/admin/AdminAppIndex.pack.js +26 -133
- package/dist/admin/AdminAppIndex.pack.js.map +1 -1
- package/dist/admin/AdminAppIndex.pack.min.js +3 -3
- package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
- package/dist/common/pages/logs/LogsPage.d.ts.map +1 -1
- package/dist/common/pages/logs/LogsPage.js +1 -1
- package/dist/common/pages/logs/LogsPage.js.map +1 -1
- package/dist/common/pages/logs/services/AppLogService.d.ts +1 -1
- package/dist/common/pages/logs/services/AppLogService.js +3 -3
- package/dist/common/pages/logs/services/AppLogService.js.map +1 -1
- package/dist/model/model.d.ts +18 -112
- package/dist/model/model.d.ts.map +1 -1
- package/dist/model/model.js +6 -82
- package/dist/model/model.js.map +1 -1
- package/dist/public/channel/BlogService.js +1 -1
- package/dist/public/channel/BlogService.js.map +1 -1
- package/dist/public/channel/ChannelMessage.d.ts +1 -0
- package/dist/public/channel/ChannelMessage.d.ts.map +1 -1
- package/dist/public/channel/ChannelMessage.js +15 -10
- package/dist/public/channel/ChannelMessage.js.map +1 -1
- package/dist/public/channel/ChannelMessageList.js +9 -3
- package/dist/public/channel/ChannelMessageList.js.map +1 -1
- package/dist/public/channel/ChannelView.d.ts.map +1 -1
- package/dist/public/channel/ChannelView.js +10 -3
- package/dist/public/channel/ChannelView.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.js +57 -146
- package/dist/public/channel/ChannelView.pack.js.map +1 -1
- package/dist/public/channel/ChannelView.pack.min.js +12 -5
- package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
- package/dist/services/email/EmailContentDownloader.d.ts +2 -2
- package/dist/services/email/EmailContentDownloader.d.ts.map +1 -1
- package/dist/services/email/EmailContentDownloader.js +5 -11
- package/dist/services/email/EmailContentDownloader.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/AppIndex.pack.js +26 -133
- package/dist/web/AppIndex.pack.js.map +1 -1
- package/dist/web/AppIndex.pack.min.js +3 -3
- package/dist/web/AppIndex.pack.min.js.map +1 -1
- package/dist/web/page/mails/service/ConversationService.d.ts +1 -1
- package/dist/web/page/mails/service/ConversationService.d.ts.map +1 -1
- package/dist/web/page/mails/service/ConversationService.js +11 -36
- package/dist/web/page/mails/service/ConversationService.js.map +1 -1
- package/package.json +1 -1
- package/src/common/pages/logs/LogsPage.tsx +4 -4
- package/src/common/pages/logs/services/AppLogService.ts +2 -2
- package/src/model/model.ts +20 -124
- package/src/public/channel/BlogService.ts +1 -1
- package/src/public/channel/ChannelMessage.tsx +16 -2
- package/src/public/channel/ChannelMessageList.tsx +3 -3
- package/src/public/channel/ChannelView.tsx +10 -3
- package/src/services/email/EmailContentDownloader.ts +6 -14
- package/src/web/page/mails/service/ConversationService.tsx +6 -36
|
@@ -79,38 +79,6 @@ export const renderMail = AtomControl.registerProperty("data-html", "html", (c,
|
|
|
79
79
|
return;
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
const downloadEmailContent = async (es: EntityService, email: IEmail) => {
|
|
83
|
-
if (email.replyCount) {
|
|
84
|
-
const children = await es.query(Email)
|
|
85
|
-
.where({ emailID: email.emailID }, (p) => (x) => x.emailID === p.emailID && x.engagement !== null)
|
|
86
|
-
.orderByDescending((x) => x.emailID)
|
|
87
|
-
.toPagedList({
|
|
88
|
-
start: 0,
|
|
89
|
-
size: 4,
|
|
90
|
-
cacheVersion: "a",
|
|
91
|
-
cacheSeconds: 900
|
|
92
|
-
});
|
|
93
|
-
email.children = children?.items ?? [];
|
|
94
|
-
} else {
|
|
95
|
-
email.children ??= [];
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (!email.originalFileID) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
for(let i=0;i < 10;i++) {
|
|
103
|
-
try {
|
|
104
|
-
const rs = await fetch(email.htmlBodyUrl);
|
|
105
|
-
const text = await rs.text();
|
|
106
|
-
email.htmlBody = text;
|
|
107
|
-
return;
|
|
108
|
-
} catch (error) {
|
|
109
|
-
console.error(error);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
|
|
114
82
|
@DISingleton()
|
|
115
83
|
export default class ConversationService {
|
|
116
84
|
|
|
@@ -210,7 +178,8 @@ export default class ConversationService {
|
|
|
210
178
|
const d = BusyProgress.create();
|
|
211
179
|
|
|
212
180
|
try {
|
|
213
|
-
for (const
|
|
181
|
+
for (const mce of emails.items) {
|
|
182
|
+
const { email } = mce;
|
|
214
183
|
// if (email.htmlBody || typeof email.htmlBody === "string") {
|
|
215
184
|
// continue;
|
|
216
185
|
// }
|
|
@@ -219,7 +188,7 @@ export default class ConversationService {
|
|
|
219
188
|
email.htmlBody ??= "";
|
|
220
189
|
email.textBody ??= "";
|
|
221
190
|
|
|
222
|
-
tasks.push(this.downloadEmailContent(
|
|
191
|
+
tasks.push(this.downloadEmailContent(mce));
|
|
223
192
|
tasks.push(this.engagementService.downloadEngagements(email));
|
|
224
193
|
}
|
|
225
194
|
await Promise.all(tasks);
|
|
@@ -236,7 +205,8 @@ export default class ConversationService {
|
|
|
236
205
|
CommonEvents.onEmailUnscheduled.dispatchEvent(mce);
|
|
237
206
|
}
|
|
238
207
|
|
|
239
|
-
async downloadEmailContent(
|
|
208
|
+
async downloadEmailContent(mce: IMailboxContactEmail) {
|
|
209
|
+
const { email } = mce;
|
|
240
210
|
if (email.replyCount) {
|
|
241
211
|
const children = await this.entityService.query(Email)
|
|
242
212
|
.where({ emailID: email.emailID }, (p) => (x) => x.emailID === p.emailID && x.engagement !== null)
|
|
@@ -251,7 +221,7 @@ export default class ConversationService {
|
|
|
251
221
|
} else {
|
|
252
222
|
email.children ??= [];
|
|
253
223
|
}
|
|
254
|
-
await this.emailContentDownloader.download(
|
|
224
|
+
await this.emailContentDownloader.download(mce);
|
|
255
225
|
}
|
|
256
226
|
|
|
257
227
|
|