Short code to insert Join/Leave group button into a post

To integrate group memberships more fluidly into the community-building aspects of Discourse posts, it would helpful to have a short-cut for inserting the join group interface directly into any post.

For example, it could be a code added to the end of a group name, e.g. @volunteers_group:join. Whether the button appears as +Join or +Request to join or -Leave will depend on the users current membership and group security.

The button should be displayed with the group name, as well as a note indicating what priviliges joining that group offers, i.e. is it a public/private group; which categories have added visibility.

The feature would give administrators of projects the ability to bootstrap teams very efficiently.

5 Likes

Canā€™t you just send out invites which contain a group membership? As I understand it, invites work to add existing users to a group, correct @techapj?

2 Likes

I think the use case is around self service, the groups page is kind of hidden, it would be a fairly complex change permission wise to support the proposal though

1 Like

Hereā€™s an example post.

Welcome to the conference!

There are three content streams being featured, but each attendee should pick only one to focus on. Select which group to join below. We are also looking for 5 jury members to choose winning projects. Apply if interested.

Stream 1: Fruit ā€“ JOIN
Stream 2: Computers ā€“ JOIN
Stream 3: Waterfalls ā€“ JOIN

Apply to join the conference jury ā€“ APPLY

Thank you
Dr. Neylor

3 Likes

Currently the only way to add existing user to a group via invite is by using Invite Link (prepared via Invite Token), more details here:

The Invite Link can serve this case because the user will only be added to a group if they click on that link.

5 Likes

So youā€™re saying that there is already a method in the codebase for generating this link, contrary to @samā€™s concern, and itā€™s mostly a matter of building a new UI around generating the link?

Itā€™s not exactly what you are looking for and what Sam is proposing, itā€™s kind of a workaround which you can use if it works for you.

3 Likes

I think that ā€œStream 1ā€¦ā€ example would still work pretty well if those ā€œJOINā€ buttons were appropriately styled and just linked to the group page. I strongly doubt youā€™d lose many people in the onboard funnel with that extra click.

Although far from a perfect equivalent, I do hate it when websites use that interactive ā€œfollow usā€ Twitter widget which asks me to follow them immediately instead of taking me to their Twitter stream so I can see if Iā€™m actually interested in what theyā€™re putting out.

1 Like

Sort of, we should allow for /groups?only-show-group=bla which would be a very easy change and take away a ton of the current noise of simply linking to the groups page. (eg: what if there are 100 groups)

5 Likes

Maybe, the equivalent for topics is categories and tagsā€¦ should groups also have categories and tags?

2 Likes

Raising this from the dead, Iā€™ve searched and not found a good option - We want to make a lot of site settings centralized to one place.
a ā€˜notify me if the chatbot mentions @xyz groupā€™ yes-no selection that links to the group join/leave handler. Linking to groups/?showonly= is the next best thing but ā€˜joiningā€™ a ā€˜settings groupā€™ isnā€™t intuitive for a lot of our users.