# Watching First Post does not send push notifications

**URL:** https://meta.discourse.org/t/watching-first-post-does-not-send-push-notifications/105124
**Category:** Bug
**Created:** [December 27, 2018, 9:25am UTC](https://meta.discourse.org/t/watching-first-post-does-not-send-push-notifications/105124 "2018-12-27T09:25:25Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [December 27, 2018, 9:25am UTC](https://meta.discourse.org/t/watching-first-post-does-not-send-push-notifications/105124/1 "2018-12-27T09:25:25Z")

</div>

**Steps to reproduce**

1. Enable browser push notifications for User A.
2. Set User A’s notification level for Category A to “Watching First Post”.
3. Log in as User B (in incognito) and post in Category A (Post A)

Expected: User A would receive a browser push notification for Post A.  
Actual: User A receives no browser push notification. Notifications (i.e. in the user menu) and email alerts work as expected.

**Likely Cause**

In the `PostAlerter` `notify_first_post_watchers` passes `Notification.types[:watching_first_post]` as the `type` to `create_notification`: [discourse/app/services/post\_alerter.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/app/services/post_alerter.rb#L133)

`create_notification` restricts the creation of notification alerts to `NOTIFIABLE_TYPES` which does not include `:watching_first_post`: [discourse/app/services/post\_alerter.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/app/services/post_alerter.rb#L196)

This may be intentional, however reading through [this discussion](https://meta.discourse.org/t/actual-difference-between-tracked-and-watching-first-post/61036), I suspect not?

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [January 10, 2019, 12:11am UTC](https://meta.discourse.org/t/watching-first-post-does-not-send-push-notifications/105124/2 "2019-01-10T00:11:12Z")

</div>

Any update on this one? I’d be happy to make a PR that adds `watching_first_post` to `NOTIFIABLE_TYPES`.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 10, 2019, 12:36am UTC](https://meta.discourse.org/t/watching-first-post-does-not-send-push-notifications/105124/3 "2019-01-10T00:36:54Z")

</div>

This sounds like an oversight to me - watching first post should be exactly like watching… except only for the first post 😉 .

I think we can take the likes from Jeff and Sam to mean this is definitely #pr-welcome

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [January 16, 2019, 6:22am UTC](https://meta.discourse.org/t/watching-first-post-does-not-send-push-notifications/105124/4 "2019-01-16T06:22:41Z")

</div>

Made a PR for this: [add watching\_first\_post to NOTIFIABLE\_TYPES by angusmcleod · Pull Request #6887 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/6887)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 16, 2019, 11:02am UTC](https://meta.discourse.org/t/watching-first-post-does-not-send-push-notifications/105124/5 "2019-01-16T11:02:58Z")

</div>

Sure @david can you review?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 16, 2019, 11:49am UTC](https://meta.discourse.org/t/watching-first-post-does-not-send-push-notifications/105124/7 "2019-01-16T11:49:46Z")

</div>

Merged, thanks @angus

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 19, 2019, 6:00pm UTC](https://meta.discourse.org/t/watching-first-post-does-not-send-push-notifications/105124/10 "2019-01-19T18:00:11Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
