0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/app/jobs
Natalie Tay 96c4e8d994
FIX: Allow "watching first post" notification to fire when tags edit notifications are disabled (#37935)
When `disable_tags_edit_notifications` support was added to
`NotifyTagChange`, the entire job was gated with an early return:

```
return if SiteSetting.disable_tags_edit_notifications && !args[:force]
```

This blocks all notifications from the job including
`notify_first_post_watchers` (the bug), which is semantically different
from a “tag edit” notification. The setting was meant to suppress “the
tags on this topic changed” notifications (`notify_post_users`), but
inadvertently also suppressed “a topic now matches your watched tag”
notifications (`notify_first_post_watchers`).

The `PostRevisor` also gates the job enqueue:

```
if !SiteSetting.disable_tags_edit_notifications
  Jobs.enqueue(:notify_tag_change, ...)
end
```

So when `disable_tags_edit_notifications = true`, the `NotifyTagChange`
job is never even enqueued, and WFP notifications are completely
silenced for tag additions.

This PR fixes the issue.
2026-02-20 16:59:53 +08:00
..
concerns DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
onceoff DEV: Hand-pick Rails/WhereNot autofixes (#35117) 2025-10-03 13:29:22 +02:00
regular FIX: Allow "watching first post" notification to fire when tags edit notifications are disabled (#37935) 2026-02-20 16:59:53 +08:00
scheduled FIX: sort tag names in clean up tags staff log entry (#37909) 2026-02-19 14:43:58 +08:00
base.rb DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00