Invite link should not auto-accept invitation if user is already logged in

I’ve been using the Copy Invite Link features for invites primarily because I find it a lot more natural to personally craft a message to people who I am inviting to a topic (especially people who are not yet users).

Recently, I was typing up an email and when I added the link, I was kindly prompted by Gmail to test the URL:

The dialog in Discourse states that the “Invite link is only valid for this email address”:

Unfortunately, after clicking it, even though I was already logged in as myself, it appeared to immediately accept the invitation.

If a user is already logged in who is not the one who created the invite it could instead display a warning dialog saying something to the effect of “oops, looks like you are attempting to accept an invitation for another user. If you are not [logged in user], please log out and try again?”

7 Likes

Sure @techapj can you add this to your list?

3 Likes

Okay, done via:

https://github.com/discourse/discourse/commit/1253afdf959051b84d15d37e133dc7875ef520cb


4 Likes

:thumbsup: Small nitpick. Seems like that ? at the end be a . instead.

4 Likes
3 Likes