Adding a link in the message invitations

When users are invited to a message, it sends them an email with the user_notifications.invited_to_private_message_body template:

%{username} invited you to a message

> **%{topic_title}**
>
> %{topic_excerpt}

at

> %{site_title} -- %{site_description}

Is there a way to add a link to the message in the template? I tried %{base_url}%{url}, but it seems to be invalid for that template.

Users are getting confused, since there is nothing to click. If it isn’t possible to link to the message, I can just send them to the /my/messages path, which seems to redirect them to their messages list.

3 Likes

Do you try to insert the direct link as https://meta.discourse.org or user html

<a href="https://meta.discourse.org">https://meta.discourse.org</a>
1 Like

Currently, I’ve overridden the template to send users to forum.example.com/my/messages, but that’s just the list of all messages. I’m hoping to send them directly to the specific message that they have been invited to.

It seems odd that we don’t include a link in this email @techAPJ? Can you repro?

2 Likes

Yes, this seems like a recent regression from email HTML customization feature. We used to include “Visit Message” link in email footer, not anymore. Will fix on priority.

2 Likes

PR here:

Will merge once the PR is reviewed by @neil.

Note that this change is specific to inviting existing users. Inviting new user via email already includes topic/message link per template.

2 Likes