add support for Gotify push notifications

This commit is contained in:
2020-09-02 08:27:09 -05:00
parent 7117099993
commit 3ce470a9b2
17 changed files with 374 additions and 1 deletions

View File

@@ -28,6 +28,13 @@ class ForeignIPLoginAlertJob extends Job {
button_link: `${this.configs.get('app.url')}dash/profile`,
}
})
if ( user.notify_config && user.notify_config.active ) {
await user.notify_config.log({
title: `${this.configs.get('app.name')}: Sign-In From New IP`,
message: `Someone signed into your account (${user.uid}) from the IP address ${ip}. If this was you, no further action is required.`,
})
}
} catch (e) {
this.output.error(e)
}