chore: Remove reliance on Markdown for document.getSummary, towards #3000

This commit is contained in:
Tom Moor
2022-12-30 15:14:59 -05:00
parent 0f489d54c3
commit b29a9fbeee
5 changed files with 10 additions and 17 deletions

View File

@@ -23,7 +23,8 @@ import { isRTL } from "@shared/utils/rtl";
import unescape from "@shared/utils/unescape";
import { parser, schema } from "@server/editor";
import Logger from "@server/logging/Logger";
import Document from "@server/models/Document";
import { APM } from "@server/logging/tracing";
import type Document from "@server/models/Document";
import type Revision from "@server/models/Revision";
import User from "@server/models/User";
import diff from "@server/utils/diff";
@@ -42,6 +43,7 @@ type HTMLOptions = {
signedUrls?: boolean;
};
@APM.trace()
export default class DocumentHelper {
/**
* Returns the document as a Prosemirror Node. This method uses the
@@ -176,7 +178,7 @@ export default class DocumentHelper {
let output = dom.serialize();
if (options?.signedUrls && document instanceof Document) {
if (options?.signedUrls && "teamId" in document) {
output = await DocumentHelper.attachmentsToSignedUrls(
output,
document.teamId