mirror of
https://github.com/outline/outline.git
synced 2026-12-03 10:00:13 +03:00
fix: Don't send email notification with empty diff
This commit is contained in:
1 parent
dd471328db
commit
07ad87f65f
2 files changed
+6
-2
No files matched your search
@@ -16,8 +16,8 @@ export default class DebounceProcessor extends BaseProcessor {
|
||||
globalEventQueue.add(
|
||||
{ ...event, name: "documents.update.delayed" },
|
||||
{
|
||||
// Revision creation time is lowered to one minute in development
|
||||
delay: (env.ENVIRONMENT === "production" ? 5 : 1) * 60 * 1000,
|
||||
// Revision creation time is lowered to half a minute in development
|
||||
delay: (env.ENVIRONMENT === "production" ? 5 : 0.5) * 60 * 1000,
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -219,6 +219,10 @@ export default class NotificationsProcessor extends BaseProcessor {
|
||||
});
|
||||
|
||||
let content = markdownDiff(previous ? previous.text : "", revision.text);
|
||||
if (!content) {
|
||||
continue;
|
||||
}
|
||||
|
||||
content = await replaceImageAttachments(content);
|
||||
|
||||
await DocumentNotificationEmail.schedule({
|
||||
|
||||
Reference in new issue
Block a user