Properly detect new user agents and location

This commit is contained in:
Johannes Zellner
2021-04-30 13:21:50 +02:00
parent af2c096975
commit fb5c2a5e52
6 changed files with 72 additions and 12 deletions

View File

@@ -142,9 +142,12 @@ function sendInvite(user, invitor, inviteLink) {
});
}
function sendNewLoginLocation(user, newLocation) {
function sendNewLoginLocation(user, ip, userAgent, country, city) {
assert.strictEqual(typeof user, 'object');
assert.strictEqual(typeof newLocation, 'string');
assert.strictEqual(typeof ip, 'string');
assert.strictEqual(typeof userAgent, 'string');
assert.strictEqual(typeof country, 'string');
assert.strictEqual(typeof city, 'string');
debug('Sending new login location mail');