From d18584f8e9f9423f9d72d837a36a0c3cad6e8d10 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sat, 12 Aug 2023 15:36:29 +1000 Subject: Refactor email sending + remove email verification if mail sending is not set up --- assets/email_templates/new_login_location.html | 143 +++++++++---------- assets/email_templates/password_reset_request.html | 125 ++++++++--------- src/api/routes/auth/login.ts | 8 +- src/api/routes/auth/register.ts | 5 +- src/api/routes/users/@me/index.ts | 2 - src/util/entities/User.ts | 21 +-- src/util/util/email/index.ts | 151 +++++++-------------- 7 files changed, 174 insertions(+), 281 deletions(-) diff --git a/assets/email_templates/new_login_location.html b/assets/email_templates/new_login_location.html index e4911c5e..8c188def 100644 --- a/assets/email_templates/new_login_location.html +++ b/assets/email_templates/new_login_location.html @@ -1,84 +1,76 @@ -
- - - - -+
- Hey {userUsername}, -
-- It looks like someone tried to log into your {instanceName} - account from a new location. If this is you, follow the link - below to authorize logging in from this location on your - account. If this isn't you, we suggest changing your - password as soon as possible. -
-
- IP Address: {ipAddress}
-
- Location: {locationCity}, {locationRegion},
- {locationCountryName}
-
+ It looks like someone tried to log into your {instanceName} + account from a new location. If this is you, follow the link + below to authorize logging in from this location on your + account. If this isn't you, we suggest changing your + password as soon as possible. +
+
+ IP Address: {ipAddress}
+
+ Location: {locationCity}, {locationRegion},
+ {locationCountryName}
+
- Alternatively, you can directly paste this link into - your browser: -
- {verifyUrl} -+ Alternatively, you can directly paste this link into + your browser: +
+ {actionUrl}