I have a group with people using mailing_list_mode, that has a “watch first post” on a category.
Because they’re using mailing_list_mode, they receive everything from public categories that they are not (necessarily) interested about. So I would like to mute everything but the watched category.
Is there a way to do this without having to identify each and every category to mute – or is there an easy way (using data-explorer queries) to get those categories?
So you want to mute all categories in the settings of the group except for the ones that are watched or where the first post is watched?
I think you could use data explorer to provide you a list of the category IDs separated with | so you can paste it directly into the group setting.
Like this:
Is that what you had in mind?
This is the query I used to get that list:
--[params]
-- group_id :group
WITH excluded_categories AS (
SELECT category_id
FROM group_category_notification_defaults
WHERE group_id = :group
AND notification_level IN (3, 4)
),
category_names AS (
SELECT id
FROM categories
WHERE id NOT IN (SELECT category_id FROM excluded_categories)
)
SELECT string_agg(CAST(id AS TEXT), '|') AS category_list
FROM category_names;