mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-26 05:24:04 +03:00
Store HTML message (#3594)
* Store HTML message * remove console log * fix html label/description
This commit is contained in:
parent
c9e326f2ae
commit
d176ba95d3
@ -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,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -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',
|
||||||
|
Loading…
Reference in New Issue
Block a user