@social-mail/social-mail-web-server 1.8.381 → 1.8.382
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/model/entities/Email.d.ts +1 -0
- package/dist/server/model/entities/Email.d.ts.map +1 -1
- package/dist/server/model/entities/Email.js +5 -1
- package/dist/server/model/entities/Email.js.map +1 -1
- package/dist/server/model/events/EmailEvents.d.ts.map +1 -1
- package/dist/server/model/events/EmailEvents.js +0 -23
- package/dist/server/model/events/EmailEvents.js.map +1 -1
- package/dist/server/seed/ui/seed-ui.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/server/model/entities/Email.ts +4 -1
- package/src/server/model/events/EmailEvents.ts +0 -22
- package/src/server/seed/ui/seed-ui.ts +1 -1
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ import MailboxContactEmail from "./MailboxContactEmail.js";
|
|
|
12
12
|
import type ChannelEmail from "./ChannelEmail.js";
|
|
13
13
|
import { User } from "./User.js";
|
|
14
14
|
import type SubscriberActivity from "./SubscriberActivity.js";
|
|
15
|
-
import { IgnoreJsonProperty, ReadOnlyJsonProperty } from "@entity-access/server-pages/dist/services/ModelService.js";
|
|
15
|
+
import { IgnoreJsonProperty, JsonProperty, ReadOnlyJsonProperty } from "@entity-access/server-pages/dist/services/ModelService.js";
|
|
16
16
|
import type EmailEngagement from "./EmailEngagement.js";
|
|
17
17
|
import Sql from "@entity-access/entity-access/dist/sql/Sql.js";
|
|
18
18
|
import { apiPath } from "../../../common/globalEnv.js";
|
|
@@ -262,6 +262,9 @@ export class Email {
|
|
|
262
262
|
@ReadOnlyJsonProperty
|
|
263
263
|
postID: string;
|
|
264
264
|
|
|
265
|
+
@JsonProperty()
|
|
266
|
+
public sanitizedHtml: string;
|
|
267
|
+
|
|
265
268
|
public tempID: any;
|
|
266
269
|
|
|
267
270
|
public mimeFile: EmailLog;
|
|
@@ -352,29 +352,7 @@ export default class EmailEvents extends AuthenticatedEvents<Email> {
|
|
|
352
352
|
if (entity.htmlBody) {
|
|
353
353
|
if (entity.status === "published") {
|
|
354
354
|
entity.htmlBody = null;
|
|
355
|
-
} else {
|
|
356
|
-
const htmlService = ServiceProvider.resolve(this, HtmlSanitizer);
|
|
357
|
-
const encryptionService = ServiceProvider.resolve(this, EncryptionService);
|
|
358
|
-
const emailID = entity.emailID.toString();
|
|
359
|
-
let ei;
|
|
360
|
-
let prefix;
|
|
361
|
-
const { host, encryptionKey } = globalEnv.emailContentProxy;
|
|
362
|
-
if (host) {
|
|
363
|
-
ei = encryptionService.global.encrypt(emailID.toString(), encryptionKey, host);
|
|
364
|
-
prefix = `https://${host}/api/emails/d/${ei}/${emailID}/`;
|
|
365
|
-
} else {
|
|
366
|
-
ei = encryptionService.general.encrypt(emailID.toString());
|
|
367
|
-
prefix = `/api/emails/d/${ei}/${emailID}/`;
|
|
368
|
-
}
|
|
369
|
-
const result = htmlService.sanitizeExternalResources({
|
|
370
|
-
html: entity.htmlBody,
|
|
371
|
-
text: entity.textBody,
|
|
372
|
-
prefix
|
|
373
|
-
});
|
|
374
|
-
entity.htmlBody = result.html;
|
|
375
|
-
entity.textBody = result.text;
|
|
376
355
|
}
|
|
377
|
-
|
|
378
356
|
// const blog = entity.status === "published"
|
|
379
357
|
// ? `@` + entity.senderName.split("@")[0]
|
|
380
358
|
// : "";
|
|
@@ -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.
|
|
20
|
+
version: "1.9.76"
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
await config.saveVersion(WebComponentsPackageConfig, {
|