Skip to content

Commit

Permalink
Store HTML message (#3594)
Browse files Browse the repository at this point in the history
* Store HTML message

* remove console log

* fix html label/description
  • Loading branch information
Weiko authored Jan 23, 2024
1 parent c9e326f commit d176ba9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class MessagingUtilsService {
const receivedAt = new Date(parseInt(message.internalDate));

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,
message.headerMessageId,
Expand All @@ -100,6 +100,7 @@ export class MessagingUtilsService {
messageDirection,
messageThreadId,
message.text,
message.html,
],
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ export class MessageObjectMetadata extends BaseObjectMetadata {
})
body: string;

@FieldMetadata({
type: FieldMetadataType.TEXT,
label: 'Html',
description: 'Html',
icon: 'IconMessage',
})
html: string;

@FieldMetadata({
type: FieldMetadataType.DATE_TIME,
label: 'Received At',
Expand Down

0 comments on commit d176ba9

Please sign in to comment.