fix: Respect fullWidth setting when creating document from template

This commit is contained in:
Tom Moor
2023-09-13 20:54:37 -04:00
parent a32857c715
commit 56a526e930

View File

@@ -80,13 +80,14 @@ export default async function documentCreator({
createdById: user.id,
template,
templateId,
fullWidth,
publishedAt,
importId,
fullWidth: templateDocument ? templateDocument.fullWidth : fullWidth,
emoji: templateDocument ? templateDocument.emoji : emoji,
title: templateDocument
? DocumentHelper.replaceTemplateVariables(templateDocument.title, user)
: title,
title: DocumentHelper.replaceTemplateVariables(
templateDocument ? templateDocument.title : title,
user
),
text: await DocumentHelper.replaceImagesWithAttachments(
DocumentHelper.replaceTemplateVariables(
templateDocument ? templateDocument.text : text,