fix: Language in document notification email, missing collection name
This commit is contained in:
@@ -21,6 +21,7 @@ export default async function revisionCreator({
|
|||||||
{
|
{
|
||||||
name: "revisions.create",
|
name: "revisions.create",
|
||||||
documentId: document.id,
|
documentId: document.id,
|
||||||
|
collectionId: document.collectionId,
|
||||||
modelId: revision.id,
|
modelId: revision.id,
|
||||||
teamId: document.teamId,
|
teamId: document.teamId,
|
||||||
actorId: user.id,
|
actorId: user.id,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export default class DocumentNotificationEmail extends BaseEmail<
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected preview({ actorName, eventName }: Props): string {
|
protected preview({ actorName, eventName }: Props): string {
|
||||||
return `${actorName} ${eventName} a new document`;
|
return `${actorName} ${eventName} a document`;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected renderAsText({
|
protected renderAsText({
|
||||||
|
|||||||
@@ -44,14 +44,14 @@ export default class NotificationsProcessor extends BaseProcessor {
|
|||||||
if (event.data?.source === "import") {
|
if (event.data?.source === "import") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const [document, team] = await Promise.all([
|
const [collection, document, team] = await Promise.all([
|
||||||
|
Collection.findByPk(event.collectionId),
|
||||||
Document.findByPk(event.documentId),
|
Document.findByPk(event.documentId),
|
||||||
Team.findByPk(event.teamId),
|
Team.findByPk(event.teamId),
|
||||||
]);
|
]);
|
||||||
if (!document || !team || !document.collection) {
|
if (!document || !team || !collection) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { collection } = document;
|
|
||||||
const notificationSettings = await NotificationSetting.findAll({
|
const notificationSettings = await NotificationSetting.findAll({
|
||||||
where: {
|
where: {
|
||||||
userId: {
|
userId: {
|
||||||
|
|||||||
Reference in New Issue
Block a user