refactor(core): Decouple emailing and workflow sharing from internal hooks (no-changelog) (#10326)

This commit is contained in:
Iván Ovejero
2024-08-08 12:33:18 +02:00
committed by GitHub
parent ee8c9a5b24
commit ee03400c25
8 changed files with 47 additions and 47 deletions

View File

@@ -120,14 +120,10 @@ export class UserManagementMailer {
return result;
} catch (e) {
Container.get(InternalHooks).onEmailFailed({
user: sharer,
message_type: 'Workflow shared',
public_api: false,
});
Container.get(EventService).emit('email-failed', {
user: sharer,
messageType: 'Workflow shared',
publicApi: false,
});
const error = toError(e);
@@ -179,14 +175,10 @@ export class UserManagementMailer {
return result;
} catch (e) {
Container.get(InternalHooks).onEmailFailed({
user: sharer,
message_type: 'Credentials shared',
public_api: false,
});
Container.get(EventService).emit('email-failed', {
user: sharer,
messageType: 'Credentials shared',
publicApi: false,
});
const error = toError(e);