[3.0] Only digests the boards and topics a member asked to be emailed about - #9614
Open
albertlast wants to merge 1 commit into
Open
[3.0] Only digests the boards and topics a member asked to be emailed about#9614albertlast wants to merge 1 commit into
albertlast wants to merge 1 commit into
Conversation
Watching a board or a topic records two things: a row in log_notify, and a preference whose bits say whether the member wants an alert, an email, or both. The digest read the rows and never the preference, so a member who asked for alerts alone was emailed a summary of everything they were watching - the notification setting they had chosen said email was not wanted, and the immediate notifications honoured it while the digest did not. The watcher lists are now filtered by the same preference, resolved the same way SMF\Tasks\CreatePost_Notify resolves it: the per board or per topic setting where the member made one, otherwise their general setting for boards or topics. Co-Authored-By: Claude Opus 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
Watching a board or a topic records two things: a row in
log_notify, and a preference whose bits say whether the member wants an alert, an email, or both.SendDigestsread the rows and never the preference, so a member who asked for alerts alone was emailed a summary of everything they were watching.That is not an obscure combination — it is the default. On a fresh profile the "Notify me of replies" and "Notify me of new topics" email boxes are unticked, so watching a board through the normal link writes
board_notify_<id> = 1, alert only.CreatePost_Notifyhonours that and sends no email; the digest ignored it and did.The watcher lists are now filtered by the same preference, resolved the way
CreatePost_Notifyresolves it: the per board or per topic setting where the member made one, otherwise their generalboard_notify/topic_notify. The preference fetch moves up to where the lists are built, since that is now where it is needed.Verified on the Docker stack. UserA watching a board with the email box ticked and UserB watching the same board with it unticked: before, both mails listed the new topic and the reply; after, only UserA's does.
Note that UserB still receives a mail, now with nothing in it. That is a separate defect — the digest is assembled and sent whether or not any section found anything — and is fixed in #9615. The two touch the same file.
Not covered by a test.
SendDigests::execute()opens with a query and needs a database throughout, so it is out of scope for the unit suite.Issues References (Fixes|Related|Closes)
🤖 Generated with Claude Code