Store HTML message (#3594)

* Store HTML message

* remove console log

* fix html label/description
This commit is contained in:
Weiko 2024-01-23 19:40:05 +01:00 committed by GitHub
parent c9e326f2ae
commit d176ba95d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -91,7 +91,7 @@ export class MessagingUtilsService {
const receivedAt = new Date(parseInt(message.internalDate)); const receivedAt = new Date(parseInt(message.internalDate));
await manager.query( await manager.query(
`INSERT INTO ${dataSourceMetadata.schema}."message" ("id", "headerMessageId", "subject", "receivedAt", "direction", "messageThreadId", "body") VALUES ($1, $2, $3, $4, $5, $6, $7)`, `INSERT INTO ${dataSourceMetadata.schema}."message" ("id", "headerMessageId", "subject", "receivedAt", "direction", "messageThreadId", "body", "html") VALUES ($1, $2, $3, $4, $5, $6, $7, $8)`,
[ [
newMessageId, newMessageId,
message.headerMessageId, message.headerMessageId,
@ -100,6 +100,7 @@ export class MessagingUtilsService {
messageDirection, messageDirection,
messageThreadId, messageThreadId,
message.text, message.text,
message.html,
], ],
); );

View File

@ -70,6 +70,14 @@ export class MessageObjectMetadata extends BaseObjectMetadata {
}) })
body: string; body: string;
@FieldMetadata({
type: FieldMetadataType.TEXT,
label: 'Html',
description: 'Html',
icon: 'IconMessage',
})
html: string;
@FieldMetadata({ @FieldMetadata({
type: FieldMetadataType.DATE_TIME, type: FieldMetadataType.DATE_TIME,
label: 'Received At', label: 'Received At',