Deliver subscription notifications through the phpBB notification system - #457
Open
ECYaz wants to merge 1 commit into
Open
Deliver subscription notifications through the phpBB notification system#457ECYaz wants to merge 1 commit into
ECYaz wants to merge 1 commit into
Conversation
Titania subscription events were emailed directly through the legacy messenger, invisible to the board's notification bell and the UCP notification options. Route them through the notification manager instead: five data-driven notification types (posted, contribution, queue, queue_move sharing the queue option, attention) select their recipients from the existing watch table and render the existing email templates through the email method, so watchers now get board and/or email delivery per their UCP preferences. The watch table remains the source of what a user subscribed to; the subscribe UI and UCP subscriptions module are unchanged. To keep subscribing meaning mail-me for everyone, a migration adds an email preference row for every existing watcher (the board method delivers by default without a row) and new users get default email rows for the Titania types at registration, exactly like the core does for its post and topic types. The attention and no-validation revision dispatches move after their rows are inserted, since the notification needs the item id. Deleting a post, revision, queue item or contribution now also deletes the notifications that point at it.
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.
Titania subscriptions currently deliver email only, sent straight through the legacy messenger class. Nothing reaches the notification bell or the UCP notification options, so authors who do not read email think the CDB has no notifications at all (#452).
This routes all subscription events through the phpBB notification system. The types appear as a Customisation Database group on the UCP notification options page, where each user can choose board and email delivery for each type. Five notification types cover the existing events:
These are the same events and the same recipients as the emails today, converted one for one. No new events and no author facing status updates are added here, that discussion stays in #450.
What stays the same:
Also fixed along the way: the attention and revision dispatches ran before their database rows existed, and deleting a post, revision, queue item or contribution now removes the notifications that point at it.
Two notes for review:
Resolves #452