This commit introduces optional, custom `<title>` tags that can be
added to `static/email-templates/*.html` so as to make the subjectlines
fully scriptable for system e-mails and notifications.
The tag must look like this.
```
<title data-i18n>Stuff {{ .Subscriber.Name }} here!</title>
```
- Add materialized views for list -> subscriber counts, dashboard chart,
and dashboard aggregate stats that slow down significantly on large
databases (with millions or tens of millions of subscribers). These
slow queries involve full table scan COUNTS().
- Add a toggle to enable caching slow results in Settings -> Performance.
- Add support for setting a cron string that crons and periodically
refreshes aggregated stats in materialized views.
Closes#1019.
- Sent count is no longer the batch size fetched from the DB but is
the actual count of messages sent.
- Pausing and resuming now accurately tracks the last subscriber that
was processed and resumes from there.
- Fix multiple concurrent campaigns blocking.
Closes#1616. Closes#905. Closes#1496. Closes#1250. Closes#1010.
This commit fully refactors the core campaign manager logic.
It applies a whole new approach to campaign state and lifecycle management.
- Create a new "pipeline" abstraction on top of campaign
for state management.
- Account for every message processed and end campaigns
based on the actual count.
- Discard in-queue messages in the pipeline of a paused
or cancelled campaign.
The only way to get precise OS information cross platform is to have
a separate file for each platform with a build tag that returns the
info, which seems excessive for this usecase.
- Add new 'Subscriptions' table on the subscriber list form that shows subs,
IP, and other data.
- Add new `meta` JSONB field to `subscriber_lsts` table.
Closes#1329.
This PR masks all the password fields in the UI with a pseudo dot character
retaining the rune length of the original password so that the password
fields on the UI appear to be containing the entered value as-is.
The earlier implementation would revert to a fixed length dummy password
confusing certain users and making it look like the password they entered
wasn't being saved.