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.

3 Likes

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.

2 Likes

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!

2 Likes

@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:

2 Likes

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?

2 Likes

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
pref=:watching_first_post

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)
end

Hope it helps someone

5 Likes

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

2 Likes

This plugin is now obsolete, right?

2 Likes

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

4 Likes

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.

2 Likes

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.)