Repository navigation
1.9.0
New: the detail page shows the mail that went out
Until now a notification's detail page said who was sent what — not how it arrived at the
recipient. Now the mail itself hangs below it, with this row's values inserted.
Not a single line of recipient text is stored in the process. What goes into the shared snapshot
layer (email_template_snapshots in statamic-email-templates) is the mail layout with
{{ title }}, {{ body }} and {{ link }} as placeholders — the template as it stood at the
time of sending, plus the subject and the sender it was really sent under. Insertion happens only
when it is viewed, and the result is not stored. That is why this row needs no retention period
and no deletion concept.
A new column notification_items.email_template_snapshot_id points at the version this row
received. Ten thousand mails of the same kind share one snapshot row; if the layout is changed, a
new one comes into being and the old one stays.
For rows without a mail — in_app and every short-message channel a host registers — nothing is
recorded, and the page says so. A short message has no layout; its "template" would be nothing but
the text to one particular person. That text already stands in the row and is shown there.
Without statamic-email-templates installed, or with it switched off, the section is absent.
New: settings in the Control Panel
Five values are changeable per brand under Addon Settings: the main switch, the list length, the
digest's default frequency, the address of the settings page and the realtime signal. Whatever has
not been touched still follows config/notifications.php.
Not on the page: cp.enabled and sources.leadhub are read at boot and would take effect only at
the next deploy; channels are class names; realtime.channel_prefix is part of the contract with
the client. The group texts say so.
New permission: manage notifications settings. Nobody holds it at first, and until it is assigned
to a role the section stays invisible, even for users who may do everything else in this addon. The
existing permissions stay unchanged.
Requires goldnead/statamic-brand-context 1.13 or later. Older versions carry the page but do
not apply its values reliably. On an installation with a single brand the settings of the addons
registered last were not laid onto the config at all — when this was measured in the playground on
09-07, notifications was one of them: after a reload the page showed the stored value while what
was read was the package default. On top of that, up to 1.12 a second save of the same section
deleted the first save's override without a message. If you set values between 09-06 and this
update, check after updating whether they are still there.