diff --git a/src/DataStore.ts b/src/DataStore.ts index fb275c8..c7f5669 100644 --- a/src/DataStore.ts +++ b/src/DataStore.ts @@ -53,6 +53,7 @@ export class DataStore { return { ...res, is_html: Boolean(res.is_html), + html_body: Boolean(res.html_body) ? res.html_body : res.full_text_body.replace(/(\r\n|\r|\n)/g, '
'), }; } return null; @@ -63,6 +64,7 @@ export class DataStore { this.insertMessage.run({ ...message, is_html: message.is_html ? 1 : 0, + html_body: message.html_body ? message.html_body : "", id: id, received_timestamp: Date.now(), });