RICH_TEXT_V2 frontend (#10083)
Adds task and note support for the new `bodyV2` field. (Field metadata type of `bodyV2` is `RICH_TEXT_V2`.) Related to issue https://github.com/twentyhq/twenty/issues/7613 Upgrade commands will be in separate PRs. Fixes https://github.com/twentyhq/twenty/issues/10084 --------- Co-authored-by: ad-elias <elias@autodiligence.com> Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -35,7 +35,20 @@ export class ActivityQueryResultGetterHandler
|
||||
return activity;
|
||||
}
|
||||
|
||||
const blocknote: RichTextBody = JSON.parse(blocknoteJson);
|
||||
let blocknote: RichTextBody = [];
|
||||
|
||||
try {
|
||||
blocknote = JSON.parse(blocknoteJson);
|
||||
} catch (error) {
|
||||
blocknote = [];
|
||||
// TODO: Remove this once we have removed the old rich text
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(
|
||||
`Failed to parse body for activity ${activity.id} in workspace ${workspaceId}, for rich text version ${isRichTextV2Enabled ? 'v2' : 'v1'}`,
|
||||
);
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(blocknoteJson);
|
||||
}
|
||||
|
||||
const blocknoteWithSignedPayload = await Promise.all(
|
||||
blocknote.map(async (block: RichTextBlock) => {
|
||||
|
||||
Reference in New Issue
Block a user