Repository navigation
[3.0] Tells members watching a topic when it is removed - #9749
Merged
jdarwood007 merged 2 commits intoOct 31, 2026
Merged
Conversation
The "topic removed" notice is queued before the topic is removed, but removing it also deletes the topic's log_notify rows, and the task only looked for watchers there once it ran. It never found anyone, so the notice has not reached anybody since notifications moved into background tasks. Mail::sendNotifications() now writes down who was watching a topic being removed, and the task notifies them from that list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This was referenced Oct 3, 2026
Adds the license header to the test file this adds, and writes the docblock of each new test method in the agreed shape: Expected:, Guards: for a regression, and @link lines for the commit that introduced the bug and for this pull request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removing a topic (
TopicRemove, or quick moderation's remove) callsMail::sendNotifications($topic, 'remove')first and thenTopic::remove(). The first only queues aCreatePost_Notifytask; it does not send anything.Topic::remove()deletes the topic's rows fromlog_notify, and when the task runs,log_notifyis exactly where it looks for the topic's watchers. It never finds anyone, sonotification_remove("A topic you are watching has been removed.") reaches nobody. This has been so since notifications moved into background tasks; 2.1 has the same order.sendNotifications()still runs while the watchers can be found. For a removal it now records them in the task data, with theirsentflags and the topic's starter and last poster, which the task uses when filtering. When the task gets that list, it loads those members directly instead of joininglog_notify. Every other kind of notification is unchanged.Testing
tests/Integration/Http/TopicRemovedNotificationTest.php:cron.phpwith the mail queue held.The member must have "A topic you are watching has been removed." waiting in the queue. Without the fix nothing is queued. Checked on MySQL and PostgreSQL.
Issues References (Fixes|Related|Closes)
🤖 Generated with Claude Code