Our discourse is only open to people who have been given an account.
We have used public groups extensively to only show categories the user is interested in (and private groups to limit access to private categories authorised people).
Often, people will publish a link to a discussion in a category that is only visible to people in a particular public group.
If someone who is not already in that group follows the link, they get an unhelpful 404 Page not found page.
In the cases where the group is public, we would like the page to offer to join the person to the public group, so they can then go on and see the topic.
Is this even possible to do in an addon?
If so, we would love advice on how to do it. We might even be able to come up with a small budget to pay for the advice (or a complete solution).