So when I have a category set to “watching first post” (“You will be notified of the first post in each new topic in these categories.”) I get push notifications on my phone when a topic is created in a category, and I get push notifications for subsequent replies too.
But when I have the category set to “watching” (“You will be notified of all new posts and topics”) I do not get push notifications.
Checking the code and I find a condition NOTIFIABLE_TYPES.include?(type)
NOTIFIABLE_TYPES does includewatching_first_post and posted but it does not include watching_category_or_tag.
Is this intentional? I’ve always thought that watching was a superset of watching first post?
EDIT I am currently running a few forums I’m using myself with a patched version that adds watching_category_or_tag and with push notification time window mins set to 0 my user experience went from ‘meh’ to ‘great’. So if this is not a bug, consider it a feature request
Oh nice catch, of course the type is tied to a translation! But… I’m curious the best text. The one for watching_first_post is below. I wonder if the translation should be X created a new post, rather than X created a new topic, since it could be a new topic but more likely is a reply.
To get more fancy with the string we will have to modify PushNotificationPusher. For now I’ll create a PR to implement my suggestion and we can follow up with an improvment.
watching_first_post: '%{username} created a new topic "%{topic}" - %{site_title}'
watching_category_or_tag: '%{username} created a new post "%{topic}" - %{site_title}'
I just pushed another commit that improves the push notification text a bit. From PR description:
Now for new topics it’ll read:
username created a new topic "title here!" - Marks' Discourse
And for new posts:
username posted in "title here!" - Marks' Discourse
After digging into the code it would be a huge change to have the text read something like: “X posted a new topic in Y category/tag”. This is a good step in the right direction and we can follow up with a much more complex change if it’s required in the future.