summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-06-07 10:05:10 +0200
committerYorhel <git@yorhel.nl>2021-06-07 10:05:12 +0200
commit588d8d5ea42b3a1e3795351a73258bdc8cbb4e47 (patch)
tree7a9cf9da69d6d3ea16933082405a113ddaca83eb
parent876cea23dd1063fcc327031d00105637a82fb55a (diff)
A few email delivery related changes
Make it clear that a valid email is required in order to create an account. The previous wording implied that there was no account activation and people would enter bogus addresses. There (should) not be a need anymore for the "shitty email provider" messages, as I'm routing mails for those destinations through external relays now. I really hate that this is necessary, but such is life. Also fix the wording of the password reset mail - that function hasn't disabled your account for a while now.
-rw-r--r--elm/Lib/Util.elm10
-rw-r--r--elm/User/PassReset.elm18
-rw-r--r--elm/User/Register.elm21
-rw-r--r--lib/VNWeb/User/PassReset.pm2
4 files changed, 15 insertions, 36 deletions
diff --git a/elm/Lib/Util.elm b/elm/Lib/Util.elm
index f2d0fbc3..b79012dd 100644
--- a/elm/Lib/Util.elm
+++ b/elm/Lib/Util.elm
@@ -91,16 +91,6 @@ containsNonLatin : String -> Bool
containsNonLatin = Regex.contains nonlatin_
--- Given an email address, returns the name of the provider if it has a good chance of blocking mails from our server.
-shittyMailProvider : String -> Maybe String
-shittyMailProvider s =
- let outlook = Maybe.withDefault Regex.never (Regex.fromString "(hotmail|live|msn|outlook)(\\.co|\\.com)?\\.[^\\.]+$")
- in case String.split "@" s |> List.drop 1 |> List.head |> Maybe.withDefault "" |> String.toLower of
- "sbcglobal.net" -> Just "AT&T"
- "att.net" -> Just "AT&T"
- d -> if Regex.contains outlook d then Just "Outlook" else Nothing
-
-
-- Format a release resolution, first argument indicates whether empty string is to be used for "unknown"
resoFmt : Bool -> Int -> Int -> String
resoFmt empty x y =
diff --git a/elm/User/PassReset.elm b/elm/User/PassReset.elm
index 56d149b1..e3b0eb2a 100644
--- a/elm/User/PassReset.elm
+++ b/elm/User/PassReset.elm
@@ -57,7 +57,11 @@ view model =
div [ class "mainbox" ]
[ h1 [] [ text "New password" ]
, div [ class "notice" ]
- [ p [] [ text "Your password has been reset and instructions to set a new one should reach your mailbox in a few minutes." ] ]
+ [ p []
+ [ text "Instructions to set a new password should reach your mailbox in a few minutes."
+ , br_ 1
+ , text "(make sure to check your spam box if the mail doesn't seem to be arriving)"
+ ] ]
]
else
form_ "" Submit (model.state == Api.Loading)
@@ -69,17 +73,7 @@ view model =
, text " and we'll send you instructions to set a new password within a few minutes!"
]
, table [ class "formtable" ]
- [ formField "email::E-Mail"
- [ inputText "email" model.email EMail GUPR.valEmail
- , case shittyMailProvider model.email of
- Nothing -> text ""
- Just n -> span []
- [ br [] []
- , b [ class "standout" ] [ text "WARNING: " ]
- , text (n ++ " is known to silently drop emails from VNDB. If your password reset email does not arrive in a few hours, I'm afraid you're fucked, because I have no way to contact you. Please complain to your email provider.")
- ]
- ]
- ]
+ [ formField "email::E-Mail" [ inputText "email" model.email EMail GUPR.valEmail ] ]
]
, div [ class "mainbox" ]
[ fieldset [ class "submit" ] [ submitButton "Submit" model.state True ]
diff --git a/elm/User/Register.elm b/elm/User/Register.elm
index 1b481e59..915c9dbe 100644
--- a/elm/User/Register.elm
+++ b/elm/User/Register.elm
@@ -68,7 +68,11 @@ view model =
div [ class "mainbox" ]
[ h1 [] [ text "Account created" ]
, div [ class "notice" ]
- [ p [] [ text "Your account has been created! In a few minutes, you should receive an email with instructions to set your password." ] ]
+ [ p []
+ [ text "Your account has been created! In a few minutes, you should receive an email with instructions to set your password."
+ , br_ 1
+ , text "(make sure to check your spam box if it doesn't seem to be arriving)"
+ ] ]
]
else
form_ "" Submit (model.state == Api.Loading)
@@ -83,19 +87,10 @@ view model =
]
, formField "email::E-Mail"
[ inputText "email" model.email EMail GUR.valEmail
- , case shittyMailProvider model.email of
- Nothing -> text ""
- Just n -> span []
- [ br [] []
- , b [ class "standout" ] [ text "WARNING: " ]
- , text (n ++ " is known to silently drop emails from VNDB, so you may not be able to activate and use your account."
- ++ " If you have an address at another provider, you may want to use that."
- ++ " If you want to keep using this provider, please kindly tell them to stop blocking VNDB. I can't help you.")
- , br [] []
- ]
, br_ 1
- , text "Your email address will only be used in case you lose your password. "
- , text "We will never send spam or newsletters unless you explicitly ask us for it or we get hacked."
+ , text "A valid address is required in order to activate and use your account. "
+ , text "Other than that, your address is only used in case you lose your password, "
+ , text "we will never send spam or newsletters unless you explicitly ask us for it or we get hacked."
, br_ 3
, text "Anti-bot question: How many visual novels do we have in the database? (Hint: look to your left)"
]
diff --git a/lib/VNWeb/User/PassReset.pm b/lib/VNWeb/User/PassReset.pm
index 8d40295a..13a34e02 100644
--- a/lib/VNWeb/User/PassReset.pm
+++ b/lib/VNWeb/User/PassReset.pm
@@ -22,7 +22,7 @@ elm_api UserPassReset => undef, {
my $body = sprintf
"Hello %s,"
."\n\n"
- ."Your VNDB.org login has been disabled, you can now set a new password by following the link below:"
+ ."You can set a new password for your VNDB.org account by following the link below:"
."\n\n"
."%s"
."\n\n"