mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +08:00
fix(server): avoid job fail if mail is not configured (#12306)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved email notification handling to prevent errors from interrupting other processes when sending emails is not possible. - **Refactor** - Updated internal email sending logic across notifications and workspace features for more robust operation. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -6,6 +6,9 @@ import { MailName } from '../../mails';
|
||||
|
||||
export class MockMailer {
|
||||
send = Sinon.createStubInstance(Mailer).send.resolves(true);
|
||||
trySend(command: Jobs['notification.sendMail']) {
|
||||
return this.send(command, true);
|
||||
}
|
||||
|
||||
last<Mail extends MailName>(
|
||||
name: Mail
|
||||
|
||||
Reference in New Issue
Block a user