Commit graph

200 commits

Author SHA1 Message Date
Kailash Nadh
fa2c840ddb Rename v2.6.0 migration to v3.0.0, the next major release. 2024-01-06 11:56:08 +05:30
Kailash Nadh
772476c0df Add accurate sent count, last sent subscriber tracking on campaigns.
- 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.
2024-01-02 14:57:04 +05:30
Kailash Nadh
414c5c0c99 Refactor the core concurrent campaign manager logic.
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.
2024-01-02 14:57:04 +05:30
Kailash Nadh
0c9dc07479 Add a ?v=hash cache breaker (that changes on restart) to static assets. 2023-12-31 22:20:37 +05:30
Kailash Nadh
2feb1b0fb8 Make the name part in from e-mails optional. Closes #1602. 2023-12-30 21:48:12 +05:30
Kailash Nadh
b2a5e37ccb Fix incorrect form messages on public re-subscription to double opt-in lists. Closes #1638. 2023-12-30 21:29:34 +05:30
Kailash Nadh
bce675870c Fix preconfirm option not working on bulk 'select all' subscriber list management. Closes #1646. 2023-12-30 20:52:14 +05:30
Kailash Nadh
0d74619cac Make providing name in subscriber creation optional and assign internally. Closes #1630. 2023-12-30 15:51:42 +05:30
Kailash Nadh
51af75cfef Add subscription status filter to subscriber list query and admin UI. 2023-12-23 16:43:28 +05:30
Kailash Nadh
01acd386f6 Add tag/type/optin filter options to lists and campaigns APIs. Closes #1631. 2023-12-23 14:45:55 +05:30
Kailash Nadh
5d635744c0 Skip non-existent dirs in --static-dir mode to use default stuffed dirs. Closes #1599. 2023-12-23 10:55:46 +05:30
Kailash Nadh
aba71119c3 Fix default non-stuffed frontend dir path. 2023-12-23 10:30:37 +05:30
Kailash Nadh
53eb71a83b Add 404 HTTP handlers to prevent those requests going to BasicAuth endpoints. 2023-11-25 11:53:56 +05:30
guangwu
4577868567
chore: remove refs to deprecated io/ioutil (#1593)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-11-16 13:57:00 +05:30
Kailash Nadh
a61a9d8c04 Fix preference management logic to avoid unnecessary DB calls. 2023-09-25 11:14:29 +05:30
Kailash Nadh
82c3c6878b Clean root URL of trailing slashes when updating settings. 2023-09-19 15:23:32 +05:30
Kailash Nadh
8f2a08b8db Fix invalid suffix 'd' in timestring string in s3 expiry config. 2023-09-19 14:45:51 +05:30
Kailash Nadh
717a6362d2 Add Sprig and other tpl functions to static templates as well. Closes #1527. 2023-09-19 11:19:34 +05:30
Kailash Nadh
2b95c88188
Add Postmark bounce webhook support (refactor #1385) (#1485)
Co-authored-by: Thomas Siebers <tom@tsiebers.de>
2023-08-31 21:27:34 +05:30
Kailash Nadh
a6a2b69820 Make public subscription API follow the 'enable public' setting. 2023-08-15 21:05:29 +05:30
Kailash Nadh
1164afac5e Fix private lists being unsubscribed from public form and re-factor subscription status view in admin. 2023-08-06 21:09:16 +05:30
Kailash Nadh
eafae46409 Fix incorrect unsubscription behaviour in the public 'Manage' flow. Closes #1407. 2023-08-06 11:38:13 +05:30
Kailash Nadh
104c4fc993 Remove non-crossplatform syscalls from /api/about.
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.
2023-08-06 10:49:20 +05:30
Kailash Nadh
2215511f2c Increase the arbitrarily low max-input-length limit. Closes #1416. 2023-08-03 23:52:20 +05:30
Kailash Nadh
dcb87a39b7 Removed unused syscall in /about API. Closes #1421, closes #1422.
Co-authored-by: Gabriel Vasile <gabriel.vasile@email.com>
2023-08-03 23:46:46 +05:30
Kailash Nadh
e89b9ffb30 Remove dead media cleanup flag. Closes #1423. 2023-08-03 23:35:21 +05:30
Kailash Nadh
ad80c716f9 Add new privacy option 'Record opt-in IP' to record IP address of optin confirmation.
- 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.
2023-07-26 23:00:32 +05:30
Kailash Nadh
a62851915c Mask passwords on the UI accurately with the actual passwords length.
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.
2023-07-21 23:46:46 +05:30
Kailash Nadh
c581fe2f3a Add GET /api/about that returns useful system info. Closes #1354. 2023-06-24 13:07:13 +05:30
cui fliter
f94c1f34b6
fix function name in comment (#1374)
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-06-20 23:40:13 +05:30
Kailash Nadh
0b2da4c664 Add support for streaming async events via HTTP serverside events.
- `GET /api/events?type=error` opens a long-lived HTTP server side
  event connection that streams error messages.
- async (typically SMTP) errors are now streamed to the frontend and
  disaplyed as an error toast on the admin UI.
2023-05-27 15:44:59 +05:30
Kailash Nadh
d359ad27aa Refactor media management.
- Change tiled UI to table UI.
- Add support for search and pagination.
- Important: This breaks the `GET /api/media` API to introduce pagination
  fields. Media items are now moved into `{ data: results[] }`.
2023-05-21 15:19:12 +05:30
Kailash Nadh
3b9a0f782e
Add support for file attachments on campaigns (#1341)
- Adds support for arbitrary file uploads with an admin setting to select allowed file extensions.
- Adds support for attaching media (files) to campaigns.
2023-05-18 16:55:59 +05:30
Kailash Nadh
917696a543 Refactor Messenger interface.
Remove `messenger.go` and move the interface definition to `manager`
and the `Message` struct to the `models` package, removing superflous
and redundant message structs used in multiple places.
2023-05-08 22:43:25 +05:30
Kailash Nadh
5fc28a733c Add support for variable bounce processing actions.
- Add support for `complaint` to the SES bounce processor.
- Add support for `hard/soft` to Sendgrid bounce processor.
- Add new bounce actions `None` and `Unsubscribe`.
- Add per type (`soft/hard/complaint`) bounce rule configuration to
  admin settings UI.
- Refactor Cypress bounce tests.
2023-04-11 11:33:40 +05:30
Kailash Nadh
13ad9adb8b Upgrade koanf to v2. 2023-04-10 12:45:25 +05:30
Kailash Nadh
98729f63df Refactor email domain blocklist config field in importer package. 2023-04-09 14:04:02 +05:30
Justin Beaty
476d5bebf2
Add support for publishing full content in public archive RSS feed body (#1262)
- Introduces a new option on the settings UI to optionally publish the full campaign body in
  public archive RSS feeds.

Closes #1033 

Co-authored-by: Kailash Nadh <kailash@nadh.in>
2023-04-08 09:39:10 +05:30
Justin Beaty
a95510260d
Add functions to notification templates (#1263) 2023-03-26 12:00:35 +05:30
Kailash Nadh
5aedc3a4f6 Make media upload file extension validation case insensitive. Closes #1256. 2023-03-25 11:46:23 +05:30
Kailash Nadh
55f7eca2e8
Add support for file attachments in the transactional (tx) API. (#1243)
The original PR accepts files to the `/tx` endpoints as Base64 encoded
strings in the JSON payload. This isn't ideal as the payload size
increase caused by Base64 for larger files can be significant,
in addition to the added clientside API complexity.

This PR adds supports for multipart form posts to `/tx` where the
JSON data (name: `data`) and multiple files can be posted simultaenously
(one or more `file` fields).

--- PR: #1166
* Attachment model for TxMessage
* Don't reassign values, just pass the manager.Messgage
* Read attachment info from API; create attachment Header
* Refactor tx attachments to use multipart form files. Closes #1166.
---

Co-authored-by: MatiSSL <matiss.lidaka@nic.lv>
2023-03-19 15:50:44 +05:30
Kailash Nadh
6cf82347bf Add support for SVG files to media. Closes #1217.
- Add support for SVG in media uploader.
- Add provision to exclude vector formats from thumbnail creation.
- Increase default thumb size to 120px from 90px.

Co-authored-by: Ronan <ronan.le_meillat@sctg.eu.org>
2023-03-19 13:58:41 +05:30
Kailash Nadh
dda7d44601 Hide private lists from prefs manage page. Closes #1200. 2023-02-26 12:36:46 +05:30
Ronan LE MEILLAT
80592f60c6
Translate the subject of the email sent with personnal datas (#1193) 2023-02-20 20:33:44 +05:30
Kailash Nadh
8985e5c24a
Add hCaptcha.com support to public subscription form. (#1152)
Bots easily bypass the simple `nonce` hack. This commit adds support
for the hcaptcha.com widget.

- New `Security` tab in the admin settings UI.
- Enable/disable CAPTCHA.
- Render CAPTCHA on the public subscription form.

Closes #1116.
2023-01-23 21:50:10 +05:30
Kailash Nadh
62d3782d04 Use send_at date for scheduled campaigns in RSS feed. Closes #1149. 2023-01-21 12:43:30 +05:30
Kailash Nadh
3cfbc646e3 Add support for multiple subscribers in a single transactional message call.
This patch adds new array fields on `POST /tx`: `subscriber_emails[]`, `subscriber_ids[]`.
Either of these array fields can be sent with multiple subscribers.

The individual non-array fields `subscriber_id` and `subscriber_email` are deprecated.

Closes #994.
2022-12-25 17:32:01 +05:30
Kailash Nadh
5d4f1ea0ad Add optional params in DB config to accept arbitrary Postgres params. Closes #1016. 2022-12-25 16:28:19 +05:30
Kailash Nadh
1f693b80f7 Add a default public archive template. 2022-12-25 16:07:12 +05:30
Kailash Nadh
4dee2e9a1b Fix per_page=all in API calls in the paginator lib.
Closes #1098.
2022-12-25 00:43:58 +05:30