Alle categorieën dempen, behalve

Probleem

Ik heb een groep met mensen die de mailing_list_mode gebruiken, die een “watch first post” op een categorie hebben ingesteld.

Omdat ze de mailing_list_mode gebruiken, ontvangen ze alles van openbare categorieën waar ze niet (noodzakelijkerwijs) in geïnteresseerd zijn. Dus ik zou graag alles willen dempen behalve de bekeken categorie.

Is er een manier om dit te doen zonder elke categorie te moeten identificeren om te dempen – of is er een gemakkelijke manier (met data-explorer queries) om die categorieën te krijgen?

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;
3 likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.