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

**URL:** https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673
**Category:** Feature
**Tags:** groups
**Created:** [May 31, 2017, 4:42pm UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673 "2017-05-31T16:42:45Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![trudat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trudat/32/104354_2.png) [@trudat](https://meta.discourse.org/u/trudat)
#### Post date: [May 31, 2017, 4:42pm UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/1 "2017-05-31T16:42:45Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 1, 2017, 12:08am UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/2 "2017-06-01T00:08:47Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [June 1, 2017, 12:20am UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/3 "2017-06-01T00:20:53Z")

</div>

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

---

<div class="post-metadata">

### Author: ![trudat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trudat/32/104354_2.png) [@trudat](https://meta.discourse.org/u/trudat)
#### Post date: [June 1, 2017, 12:31am UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/4 "2017-06-01T00:31:13Z")

</div>

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

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [June 1, 2017, 8:13am UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/5 "2017-06-01T08:13:33Z")

</div>

> [@codinghorror](#):
>
> invites work to add existing users to a group

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:

> [@Generating lots of Invite Tokens](https://meta.discourse.org/t/generating-lots-of-invite-links/17563):
>
> warning This plugin is deprecated in favour of our core invite system. Summary: Generate multiple invite tokens link GitHub: [https://github.com/discourse/discourse-invite-tokens](https://github.com/discourse/discourse-invite-tokens)arrow_right Install: Follow the [plugin installation guide](https://meta.discourse.org/t/install-a-plugin/19157). Configuration Enable plugin After installing plugin enable site setting invite tokens enabled. Clone Discourse API Gem If you already have Git and Ruby installed on your system, you can install Discourse API by running following command from consol…

> [@sam](#):
>
> I think the use case is around self service

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

---

<div class="post-metadata">

### Author: ![trudat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trudat/32/104354_2.png) [@trudat](https://meta.discourse.org/u/trudat)
#### Post date: [June 1, 2017, 1:32pm UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/6 "2017-06-01T13:32:24Z")

</div>

> [@sam](#):
>
> it would be a fairly complex change permission wise to support the proposal though

> [@techAPJ](#):
>
> The Invite Link can serve this case because the user will only be added to a group if they click on that link.

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?

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [June 1, 2017, 5:09pm UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/7 "2017-06-01T17:09:12Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [June 5, 2017, 12:44pm UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/8 "2017-06-05T12:44:36Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [June 5, 2017, 2:40pm UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/9 "2017-06-05T14:40:24Z")

</div>

> [@erlend\_sh](#):
>
> and just linked to the group page.

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)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 5, 2017, 10:18pm UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/10 "2017-06-05T22:18:15Z")

</div>

Maybe, the equivalent for topics is categories and tags.. should groups also have categories and tags?

---

<div class="post-metadata">

### Author: ![Frully](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frully/32/235059_2.png) [@Frully](https://meta.discourse.org/u/Frully)
#### Post date: [December 21, 2024, 9:44pm UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/11 "2024-12-21T21:44:54Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [March 18, 2025, 3:31pm UTC](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/12 "2025-03-18T15:31:21Z")

</div>

I like the ideas discussed in this topic. Groups could certainly use some love, though it’s not an area of focus for the team right now. Feel free to implement improvements as a theme component to try it out!

One thought that came to me is that we could add Join/Leave buttons on the user card for groups that allow people to join and leave freely.

That way the example post @trudat [wrote above](https://meta.discourse.org/t/short-code-to-insert-join-leave-group-button-into-a-post/63673/4) could be rewritten, eg:

> [@trudat](#):
>
> > Welcome to the conference!
> > 
> > There are three content streams being featured, but each attendee should pick only one to focus on. Select the group below to join it.
> > 
> > Stream 1: @Fruit  
> > Stream 2: @Computers  
> > Stream 3: @Waterfalls
> > 
> > We are also looking for 5 jury members to choose winning projects. Select @jury to apply.
> > 
> > Thank you  
> > Dr. Neylor
