# Proper way to set digest and hide category from latest

**URL:** <https://meta.discourse.org/t/proper-way-to-set-digest-and-hide-category-from-latest/204888>\
**Category:** Product Support\
**Tags:** activity-summary\
**Created:** [September 30, 2021, 4:47pm UTC](https://meta.discourse.org/t/proper-way-to-set-digest-and-hide-category-from-latest/204888 "2021-09-30T16:47:54Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)\
**Post date:** [October 4, 2021, 11:44am UTC](https://meta.discourse.org/t/proper-way-to-set-digest-and-hide-category-from-latest/204888/5 "2021-10-04T11:44:01Z")

</div>

I’d like to share my solution.

I clicked necessary settings in UI (mute and track some categories) as Gavin mentioned:

> [@IAmGav](#):
>
> these settings

Then I connected to the DB to determine id’s of categories and users. Tables: `category_users` and `users`.

I filtered settings for myself (for user\_id=5) as shown in the picture below:

 ![изображение](https://global.discourse-cdn.com/meta/original/3X/b/a/ba156a61946be80aab0ef681c5021bcb3f2dee8d.png)

Next, I want to apply the same settings for two other users with id=33 and 34. Obviously I need to add proper lines into the table `category_users`.

Example:

- There are 6 categories: id=1, 2, 15, 17, 19 and 24.
- Muted categories 15 and 17
- Watching the first post in categories 1, 2 and 24
- Tracking one category 19.

First of all I created a script that insertes all of the selected categories to muted section (notification\_level=0):

```sql
INSERT INTO 
	"category_users" 
	("category_id", "user_id", "notification_level", "last_seen_at") 
VALUES
(24, 34, 0, NULL),
(2, 34, 0, NULL),
(1, 34, 0, NULL),
(19, 34, 0, NULL),
(15, 34, 0, NULL),
(17, 34, 0, NULL),

(24, 33, 0, NULL),
(2, 33, 0, NULL),
(1, 33, 0, NULL),
(19, 33, 0, NULL),
(15, 33, 0, NULL),
(17, 33, 0, NULL);

```

You may add up to 1000 lines at once.

After that I updated the raws for Tracked and Watched 1st post categories:

```sql
--watch 1st post
UPDATE "public"."category_users" SET "notification_level"='4' WHERE "category_id" in (1,2,24);
--track
UPDATE "public"."category_users" SET "notification_level"='2' WHERE "category_id"=19;

```

After that user settings are updated. Muted categories are hidden from main page and latest topics.

![изображение](https://global.discourse-cdn.com/meta/original/3X/3/a/3a2a2d7f2934d94810e13cb2bd977b54448df497.png)

Let me know if there is any other simple way to bulk edit users settings concerning muted or watched categories.

---

_[View the full topic](https://meta.discourse.org/t/proper-way-to-set-digest-and-hide-category-from-latest/204888)._
