Watching First Post does not send push notifications

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: 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: https://github.com/discourse/discourse/blob/master/app/services/post_alerter.rb#L196

This may be intentional, however reading through this discussion, I suspect not?

6 Likes

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

2 Likes

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

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

6 Likes

Made a PR for this: https://github.com/discourse/discourse/pull/6887

4 Likes

Sure @david can you review?

1 Like

Merged, thanks @angus

6 Likes

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