# Watching group PMs by default

**URL:** <https://meta.discourse.org/t/watching-group-pms-by-default/55285>\
**Category:** Feature\
**Created:** [2017年一月6日 16:44 UTC](https://meta.discourse.org/t/watching-group-pms-by-default/55285 "2017-01-06T16:44:59Z")\
**Posts on this page:** 1\
**Showing post:** 25

<div class="post-metadata">

**Author:** ![rriemann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rriemann/32/115238_2.png) [@rriemann](https://meta.discourse.org/u/rriemann)\
**Post date:** [2017年四月24日 07:56 UTC](https://meta.discourse.org/t/watching-group-pms-by-default/55285/25 "2017-04-24T07:56:04Z")

</div>

If it is a one-time thing, use the shell:

> [@Make members of a group watch a category by default](https://meta.discourse.org/t/make-members-of-a-group-watch-a-category-by-default/22127/57):
>
> ```ruby
> groups = ['my', 'groups']
> groups.each do |group_name|
> group = Group.find_by_name(group_name)
> next if group.nil? # skip if group not found
> puts "group: #{group.name}"
>   
> # watch group inbox
> # found in discourse/spec/services/post_alerter_spec.rb
> # GroupUser.where(user_id: user.id, group_id: group.id).update_all(notification_level: level) # change for one user
> GroupUser.where(group_id: group.id).update_all(notification_level: GroupUser.notification_levels[level]) # change for whole group
> end
> 
> ```

---

_[View the full topic](https://meta.discourse.org/t/watching-group-pms-by-default/55285)._
