From 712a77d7e0abb611dc24de634df77bcf41f40fdf Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Thu, 20 Jun 2024 18:07:08 -0400 Subject: [PATCH] fixup invite link to automatically ask for verification token on click. modified: lib/mail.py --- make_post_sell/lib/mail.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/make_post_sell/lib/mail.py b/make_post_sell/lib/mail.py index a74fa79..45fe2d6 100644 --- a/make_post_sell/lib/mail.py +++ b/make_post_sell/lib/mail.py @@ -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)