Adds content column to documents and revisions as JSON snapshot (#6179)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Transaction } from "sequelize";
|
||||
import { Optional } from "utility-types";
|
||||
import { Document, Event, User } from "@server/models";
|
||||
import DocumentHelper from "@server/models/helpers/DocumentHelper";
|
||||
import TextHelper from "@server/models/helpers/TextHelper";
|
||||
|
||||
type Props = Optional<
|
||||
Pick<
|
||||
@@ -90,12 +90,12 @@ export default async function documentCreator({
|
||||
sourceMetadata,
|
||||
fullWidth: templateDocument ? templateDocument.fullWidth : fullWidth,
|
||||
emoji: templateDocument ? templateDocument.emoji : emoji,
|
||||
title: DocumentHelper.replaceTemplateVariables(
|
||||
title: TextHelper.replaceTemplateVariables(
|
||||
templateDocument ? templateDocument.title : title,
|
||||
user
|
||||
),
|
||||
text: await DocumentHelper.replaceImagesWithAttachments(
|
||||
DocumentHelper.replaceTemplateVariables(
|
||||
text: await TextHelper.replaceImagesWithAttachments(
|
||||
TextHelper.replaceTemplateVariables(
|
||||
templateDocument ? templateDocument.text : text,
|
||||
user
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user