Group mentions and messages

(Sam Saffron) #1

As part of Discourse 1.5 we have built support for “first class” group mentions and messaging.

Out-of-the-box nobody can send messages to groups or trigger mention notifications.

On the admin group page at you can select “Who can message and @mention this group?”

Additionally you may select which groups are visible to user using the “Group is visible to all users” checkbox.

Mentioning groups

When users perform “autocomplete” using the @ key all visible groups will show up. This means that out-of-the-box you can talk about groups like @trust_level_0 and so on, Discourse will perform automatic linking.

If you enable @mentions on the group for the particular user, all the members of the group will be notified when the user mentions the group.

As a safeguard a site setting was added “max users notified per group mention” which is defaulted to 100. Even if you enable mentions on a group with 101 users, no notifications at all will be generated when they are mentioned.

Sending messages to a group

The composer was extended to allow you to use a group name as target for a message (provided the group allow messaging)

This now correctly links to the group from the message page:

Improved group pages

All group mentions (going forward) are now tracked in the database, this allows us to display them in the group page.

For example @trust_level_0 will make this post show up in the mentions list for the trust_level_0 group

Additionally we split out topics as a new top level filter.

Improving Group Messaging
Private messages to a group, or other means to handle private support requests
@group and notifications
Mention group, do not do anything
Group Tagging System
Automated PM for flagged posts displays user participants inconsistently
Private messaging to a group
Give groups Full Names and allow mentions
How to make a group announcement?
Good use cases for groups (to better understand groups vs categories)
Alias username and group mentioning
Bug Reporter Badge and 'Discourse Team' broken
How to send mass message to forum users?
(Régis Hanol) #2

Speaking of @trust_level_0, do we want to show the posts of the users which have a trust level of 0 (thus including users with a higher trust level) or only show the posts of the users which are at trust level 0?

(Sam Saffron) #3

The group, by design, is inclusive of all users that attained level 0, aka all users. It makes sense as a security construct especially at tl1 and above, don’t see any real need to change it

(Sam Saffron) #4

I just checked in an additional change that ensures users are warned if they go about mentioning a notifiable group.

For example: if I @mention @team I see this warning:

If you try to do the same you will see no warning cause you can not trigger a notification by mentioning @team

Group mention warning is huuuuuge!
(Erlend Sogge Heggen) #5

We can’t currently invite groups to an existing message. Should that be possible?

(Tobias Eigen) #6

I can confirm that it is indeed not possible to invite groups to an existing message. I totally think this should be possible - should we repost this as a feature request or bug, @sam?

(Sam Saffron) #7

It’s a feature req, but I want to get it done, mechanics are a bit tricky, especially notification wise

(Jano Suchal) #8

I am having trouble making this work. I am member of a group, when someone mentions the group i do not get any notification at all. The group mentions tab is also empty.

I’ve tried sending message to a group, but the only get a notification in the “{group} inbox” on the site, no email is sent out. The default settings for group notifications is “watching”. I don’t know if this is by design.

Use Case: I’ve created a new group and want to send out instructions. With the default (?) settings, i’ll have to wait until everyone goes back to the site and checks the “{group} inbox”.

Any ideas on what I am doing wrong?


Add a label to notify all users
(Alex Armstrong) #9

I’m in the same boat as @johno. How can I send a group PM and have the users of that group be alerted via email?

(ginger man) #10

can we restrict the users to not see the list of messages in a group even though he can post messages in it for private email support.

(Jason Sachs) #11

Same here… (we’re running Discourse 1.8.0)

(Sam Saffron) #12

You are going to have to “watch” the group…

(Jason Sachs) #13

Watch the group, or watch the category? I know how to watch a category, but how do you watch a group?

And is there any way for me as an admin to enable watching a group by default for new users? (I guess I could “impersonate” each of them in sequence, our group is only about a dozen members so not too much work)

(Leo McArdle) #14

Go to: https://your.discourse/my/messages/group/<groupname> and click on the notification level dropdown above the messages.

Go to: https://your.discourse/admin/groups/custom/<groupname> and set “Default notification level for group messages” to watching.

(Anders Thengs Kristensen) #15

I have noticed that this will happen regardless of whether the poster is allowed to mention the group or not, and whether the group is visible to all users or not.

I think that at least when the group isn’t visible, it should not link, because in that case it is just a dead link. And in most cases where the group isn’t visible, no one is allowed to mention or message it either, so if the @group link starts floating around, people may become confused about why no one responds to their mentions or why they can’t message the group. Perhaps there could be added a warning if a user tries to mention a group they aren’t allowed?

While testing this, I also came across a peculiar error when trying to send a message to a group I wasn’t allowed to message. I received the error

To do this, I started a message, filled in the message title, then used the autofill mention to mention the group in the body, and then using the autofill mention to add the group as a recipient.
On my main user (admin), it didn’t work until after a few tries. On the other users it worked immediately.

I tried this for two groups. Both groups were set to allow nobody to message them, but were visible to all users. I tried it on every trust level, as a moderator and as an admin, all across different users. I tried it across multiple browsers and devices, both mobile and desktop. But I only tested it on

(ljpp) #16


By default Discourse 1.8 has a limit set for maximum number of members to notify of messages tagged for a group. The default value is lowish 100, which prevents mass sending of notifications to for exp. user levels on larger communities.

I would like to send occasional alerts to different user levels. Why is the default value so low and is there a reason not to add couple of zeros to it?

Also, if 100 members is set as the maximum number of members to get notified, why the end users get a warning for tagging larger groups?

@rizka Did I get it right?

Mentioning @trust_level_0
Mentioning @trust_level_0
(rizka) #17

Yeah, that is all. To be more specific, you aren’t warned when you can’t mention a group. However when you can but the size of the group is greater than “max users notified per group mention”, then you get a really misleading pop-up warning.

I think that @trust_level_0 isn’t used for notifying by many Discourse admins. There are alternatives. For instance, we could abandon the “Admin announcements” thread and replace it by a new category for announcements. Only staff would have right to create topics, but everyone could reply. We could set topics as banner topics when necessary. They would catch the eye of anyone who arrives, including guests.