Make members of a group watch a category by default

But it looks like the consensus is for implementing this as a plugin. That’s something I plan to do at some point, but I can’t say when.

@LeoMcA is this something you got around to doing in the end?

Not yet, I’ll post in that other thread when I do :slight_smile:

There are a couple plugins that do this that require a bit of customization to work. One is linked above. If it won’t work for you and you have a budget, feel free to contact me.

@pfaffman, interested in what plugin you might recommend. Are you referring to this one?

1 Like

Yes. That’s one that I’ve modified. I modified it find all groups matching a pattern, and then find categories with similar names and force watching for those.

Very cool. If all we want to do is force watch 2-3 Categories for 2-3 Groups, the plug in will work out of the box?

Is there any documentation on it, or is it self-explanatory once installed?

No, it won’t work out of the box. You need to fork it on Github and modify the plugin.rb file so that it matches your groups and categories. Then you install your modified version.


Nope. If you know any programming, you might be able to make sense of the code. If not, and you have a budget, you can post in #marketplace, or contact me directly. My contact info is in my profile.


Ok, Jay. We’ve certainly valued your work in the past, so will ping you if we need further assist!

Thanks, Christoph. We’ll have a look!


@kimardenmiller I use this plugin, which I developed from the ones mentioned here:

If you can fork that plugin on GitHub, I can help you customize it. :ok_hand:


Nice Alex. Looks as if you have nicely parameterized it with the groups_cats dictionary.

Just edit those for Watching vs. Watching First Post, then just edit the frequency at the end?

Anything else to know?


Nope, you got it! :+1:

Holler if you run into trouble.

1 Like

I needed that, but as a one shot feature. What I did is (based on the code of this plugin) to run a few lines of code from the rails console:
from your discourse folder

./launcher enter app
root@application-app:/var/www/discourse# rails c
[1] pry(main)>

Once you are on the rail console:

## customise to what you want
g = Group.find_by_name('your_group')
c_id = Category.find_by_slug('you_category_slug').id

g.users.each do | user |
   existing = CategoryUser.lookup(user, pref).pluck(:category_id)
   CategoryUser.set_notification_level_for_category (user, CategoryUser.notification_levels[pref], c_id)   unless existing.include?(c_id)

Hope it helps someone


FYI this has now been updated by @LeoMcA. See:


This plugin is now obsolete, right?


Yeah, this can be done without a plugin! (On latest beta branch currently.)


Not quite – for us – unfortunately.

We need to make sure that folks who belong in certain groups have specific notifications that are enforced. For example: We have a group of Representatives who must always be watching the first post of our Announcements category. Receiving and disseminating those topics within their institutions is part of their role as Representatives. If they wish to stop receiving them then we would need to find a new Representative for that institution (which would necessitate changes to other systems beyond Discourse).

So, allowing folks to change their notification settings after joining a group – which is how the beta functionality works, IIUC – is not an option for us. It would offer an option within Discourse that would not accurately map to the human expectations that surround our use of this tool.

Not allowing people to request to stop receiving email isn’t an option for most sites on the internet. It would be a violation of the acceptable use policy of virtually every ISP and mail delivery service, including yours, I’d imagine.

You’d need a plugin that, perhaps, caught that unsubscribe request and then took an appropriate action, or perhaps you’d construct a data explorer query to find people who had unsubscribed and run it periodically and take action when you found people who’d done that.


I appreciate you’re trying be helpful and thank you for taking the time to respond. I can assure you we’re not behaving irresponsibly or flaunting relevant regulations.

Your suggestion of using data explorer is solid, but it does put the burden on us to monitor users’ settings. We’re a team of just 2 staff, so that’s time I’d rather spend doing other things. But I do see the wisdom of migrating to the new plugin (which will presumably stay updated, whereas my hacky one may fall apart at any minute).

I do wish there was an option to send a message to an admin for specific changes to settings. Just so we can track what’s happening and make sure that the volunteers working with us are getting the information they need.

1 Like

I can use Data Explorer to see which users are viewing a specific category like so:

SELECT * FROM category_users WHERE category_id = '10'

Any suggestions for how to see which users are watching which categories all in one view? (I could then export it and process it as a spreadsheet.)