diff --git a/app/typings/styled-components.d.ts b/app/typings/styled-components.d.ts
index c8e571d58..a51e8e5d0 100644
--- a/app/typings/styled-components.d.ts
+++ b/app/typings/styled-components.d.ts
@@ -16,7 +16,6 @@ declare module "styled-components" {
tableDivider: string;
tableSelected: string;
tableSelectedBackground: string;
- tableHeaderBackground: string;
quote: string;
codeBackground: string;
codeBorder: string;
diff --git a/server/commands/revisionCreator.ts b/server/commands/revisionCreator.ts
index 9ce4db287..962b8fe7f 100644
--- a/server/commands/revisionCreator.ts
+++ b/server/commands/revisionCreator.ts
@@ -10,10 +10,7 @@ export default async function revisionCreator({
user: User;
ip?: string;
}) {
- let transaction;
-
- try {
- transaction = await sequelize.transaction();
+ return sequelize.transaction(async (transaction) => {
const revision = await Revision.createFromDocument(document, {
transaction,
});
@@ -32,13 +29,6 @@ export default async function revisionCreator({
transaction,
}
);
- await transaction.commit();
return revision;
- } catch (err) {
- if (transaction) {
- await transaction.rollback();
- }
-
- throw err;
- }
+ });
}
diff --git a/server/emails/templates/DocumentNotificationEmail.tsx b/server/emails/templates/DocumentNotificationEmail.tsx
index f7c7a54f4..d99a1693b 100644
--- a/server/emails/templates/DocumentNotificationEmail.tsx
+++ b/server/emails/templates/DocumentNotificationEmail.tsx
@@ -3,6 +3,7 @@ import { Document } from "@server/models";
import BaseEmail from "./BaseEmail";
import Body from "./components/Body";
import Button from "./components/Button";
+import Diff from "./components/Diff";
import EmailTemplate from "./components/EmailLayout";
import EmptySpace from "./components/EmptySpace";
import Footer from "./components/Footer";
@@ -17,6 +18,7 @@ type InputProps = {
eventName: string;
teamUrl: string;
unsubscribeUrl: string;
+ content: string;
};
type BeforeSend = {
@@ -73,25 +75,34 @@ Open Document: ${teamUrl}${document.url}
eventName = "published",
teamUrl,
unsubscribeUrl,
+ content,
}: Props) {
+ const link = `${teamUrl}${document.url}?ref=notification-email`;
+
return (
- {actorName} {eventName} the document "{document.title}", in the{" "}
- {collectionName} collection.
+ {actorName} {eventName} the document{" "}
+ {document.title}, in the {collectionName}{" "}
+ collection.
{document.getSummary()}
-
+
-
- +