mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Decouple event bus from internal hooks (no-changelog) (#9724)
This commit is contained in:
@@ -17,6 +17,7 @@ import { toError } from '@/utils';
|
||||
|
||||
import type { InviteEmailData, PasswordResetData, SendEmailResult } from './Interfaces';
|
||||
import { NodeMailer } from './NodeMailer';
|
||||
import { EventRelay } from '@/eventbus/event-relay.service';
|
||||
|
||||
type Template = HandlebarsTemplateDelegate<unknown>;
|
||||
type TemplateName = 'invite' | 'passwordReset' | 'workflowShared' | 'credentialsShared';
|
||||
@@ -144,6 +145,10 @@ export class UserManagementMailer {
|
||||
message_type: 'Workflow shared',
|
||||
public_api: false,
|
||||
});
|
||||
Container.get(EventRelay).emit('email-failed', {
|
||||
user: sharer,
|
||||
messageType: 'Workflow shared',
|
||||
});
|
||||
|
||||
const error = toError(e);
|
||||
|
||||
@@ -199,6 +204,10 @@ export class UserManagementMailer {
|
||||
message_type: 'Credentials shared',
|
||||
public_api: false,
|
||||
});
|
||||
Container.get(EventRelay).emit('email-failed', {
|
||||
user: sharer,
|
||||
messageType: 'Credentials shared',
|
||||
});
|
||||
|
||||
const error = toError(e);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user