PR to support email notifications for new accounts.
settings.toml.example
settings.toml.example
This file has not been changed.
+10
-8
src/handlers/pdsSubscriber.ts
+10
-8
src/handlers/pdsSubscriber.ts
···
41
41
"Identity event",
42
42
);
43
43
if (config.notifyOnNewAccounts) {
44
-
await queue.add(() =>
45
-
sendNewAccountNotification(config.notifyEmails, {
46
-
did: message.did,
47
-
pds: config.host
48
-
}).catch((err) => {
49
-
logger.error({ err }, "Error sending new account notification email")
50
-
})
51
-
);
44
+
if (message.active == true) {
45
+
await queue.add(() =>
46
+
sendNewAccountNotification(config.notifyEmails, {
47
+
did: message.did,
48
+
pds: config.host
49
+
}).catch((err) => {
50
+
logger.error({ err }, "Error sending new account notification email")
51
+
})
52
+
);
53
+
}
52
54
}
53
55
await queue.add(() =>
54
56
handleNewIdentityEvent(
src/mailer.ts
src/mailer.ts
This file has not been changed.
src/types/settings.ts
src/types/settings.ts
This file has not been changed.
History
2 rounds
1 comment
expand 1 comment
pull request successfully merged
tophhie.cloud
submitted
#0
Looks great to me! Thank you!