Change category "tracking" subscription to "watching" if I post a reply

PR Submitted
https://github.com/discourse/discourse/pull/4811

4 Likes

Ok merged thanks @cpradio! :beers:

3 Likes

Unfortunately this fix isn’t right… it is now overriding in the case where

  • user posts in topic
  • user sets topic notification state to “normal”
  • user posts again in the same topic

we have to disallow change if the notification state is normal … or muted, as @cpradio alluded to. Pardon the pseudocode but this might be the fix:

notifications_reason_id IS NULL OR (notification_level < ? AND notification_level > normal)

either

  • user has not set a notification level for this topic

OR

  • desired notification level is higher than current topic notification level AND current notification level is greater than normal

(the key to understanding this is that if we do have a notification level of normal that’s explicitly set in the DB, that absolutely came from the user, as normal is an assumed default all the time.)

4 Likes

Will submit a PR to do that shortly :slight_smile: (and update the tests)

3 Likes

I believe @techapj is already working on it so I would hold off.

4 Likes

@cpradio fixed this via:

https://github.com/discourse/discourse/commit/2dccaff25d8697adb97c929c34321d98d349f34c

4 Likes