Skip to content

Deliver subscription notifications through the phpBB notification system - #457

Open
ECYaz wants to merge 1 commit into
phpbb:3.3.xfrom
ECYaz:feature/452-notifications
Open

Deliver subscription notifications through the phpBB notification system#457
ECYaz wants to merge 1 commit into
phpbb:3.3.xfrom
ECYaz:feature/452-notifications

Conversation

@ECYaz

@ECYaz ECYaz commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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:

  • posted: new topics and replies in subscribed topics and support areas, including posts approved from moderation
  • contribution: a new revision released or approved for a subscribed contribution
  • queue: a new item lands in a validation queue, for the validators watching that queue
  • queue_move: an item is moved into a queue category, for the validators watching that category (shares the UCP option of queue, it is a separate type only so the two events for one queue item do not deduplicate each other)
  • attention: new reports and unapproved content, for the moderators watching the attention list

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:

  • The watch table remains the single source of what a user subscribed to. The subscribe links, the automatic author subscriptions and the UCP subscription pages are unchanged.
  • The existing email templates are reused unchanged by the notification email method, so the mails look exactly as before.
  • Existing subscribers keep receiving email: a migration adds an email preference for every current watcher, and new users get email enabled for these types at registration, the same way the core seeds its post and topic types. Everyone gains the bell on top and can now switch email off in the UCP.

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:

  • Rolling back the code after the migration has run would leave notification rows whose types no longer exist, which breaks pages for users still holding them. A rollback would need those rows purged, or the extension properly disabled, which marks the types disabled.
  • The attention notification excludes the author of the reported content, not the reporter, so a subscribed moderator who reports something is notified of their own report. That matches the behaviour of the old email dispatcher and is preserved deliberately; happy to change it in a separate change if preferred.

Resolves #452

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deliver subscription notifications through the phpBB notification system

1 participant