fixup invite link to automatically ask for verification token on click.

modified:   lib/mail.py
This commit is contained in:
Russell Ballestrini 2024-06-20 18:07:08 -04:00
parent 8cc3aff705
commit 712a77d7e0

View file

@ -247,7 +247,10 @@ def send_invite_email(request, to_email, user, shop):
the shop the invitation is for.
"""
subject = f"You have been invited to {shop.name}"
join_link = request.route_url("join-or-log-in")
join_link = request.route_url(
"join-or-log-in",
_query={"email": to_email, "next": request.route_url("actions_new")},
)
message_text = INVITE_1_TEXT.format(user.email, shop.name, join_link)
message_html = INVITE_1_HTML.format(subject, user.email, shop.name, join_link)
send_pyramid_email(request, to_email, subject, message_text, message_html)