Commit Graph

21 Commits

Author SHA1 Message Date
Kailash Nadh f498cddc7a Add support for hosted messages and `{{ MessageURL }}` tpl tag. 2020-04-26 15:51:43 +05:30
Kailash Nadh ba87801930 Fix template preview sending invalid view requests 2020-03-08 15:10:51 +05:30
Kailash Nadh 9005bb6dad Move internal packages to 'internal' dir 2020-03-08 00:17:54 +05:30
Kailash Nadh 8853809713 Refactor and cleanup initialization.
- Clean up main.go (by moving init to init.go) and improve
  composition comprehension.
- Refactor app context and init struct and field names.
- Update package dependencies in initialisation.
2020-03-08 00:06:48 +05:30
Kailash Nadh 83b49df39d Add missing error logs 2020-03-07 23:00:55 +05:30
Kailash Nadh 4faffe0d46 Refactor template name in public pages 2020-03-07 20:24:42 +05:30
Kailash Nadh c08ca14a5b Add subscription forms 2020-03-07 20:22:01 +05:30
Kailash Nadh 6be3352f52 Refactor/merge optin-list fetch queries 2020-02-09 16:25:19 +05:30
Kailash Nadh 022b35c4a7 Add support for sending 'opt-in' campaigns.
- Campaigns now have a `type` property (regular, opt-in)
- Opt-in campaigns work for double opt-in lists and e-mail
  subscribers who haven't confirmed their subscriptions.
- Lists UI shows a 'Send opt-in campaign' optin that
  automatically creates an opt-in campaign for the list
  with a default message body that can be tweaked before
  sending the campaign.
- Primary usecase is to send opt-in campaigns to subscribers
  who are added via bulk import.

This is a breaking change. Adds a new Postgres enum type
`campaign_type` and a new column `type` to the campaigns table.
2020-02-09 11:36:15 +05:30
Kailash Nadh 871893a9d2 Add double opt-in support.
- Lists can now be marked as single | double optin.
- Insert subscribers to double opt-in lists send out a
  confirmation e-mail to the subscriber with a confirmation link.
- Add `{{ OptinURL }}` to template functions.

This is a breaking change. Adds a new field 'optin' to the lists
table and changes how campaigns behave. Campaigns on double opt-in
lists exclude subscribers who haven't explicitly confirmed subscriptions.

Changes the structure and behaviour of how notification e-mail routines,
including notif email template compilation,  notification callbacks for
campaign and bulk import completions.
2020-02-09 11:36:15 +05:30
Rohan Verma 712ad2d517 chore: minor refactors based on static checks
- unchecked returns fixed (most)
- remove unused constants
- remove unsed structs
- function parameters unused or incorrectly used
- removed if else chains for error checks
- use regex MustCompile instead of compile
- spell checks
- preallocate slice cap when size known
- scope issues inside range
2019-10-29 11:03:51 +05:30
Kailash Nadh 3be5b27d03 Fix error message 2019-07-21 21:55:12 +05:30
Kailash Nadh a060d94cb5 Move UUID validation from multiple places into a middleware func 2019-07-21 20:45:37 +05:30
Kailash Nadh 3fddd78ebf Refactor "unsubscribe from all" (self-blacklist) behaviour.
- Add an option to toggle allowing subscribers to blacklist themselves.
- Move the "unsubscribe from all" to the subscription management page
2019-07-21 20:45:35 +05:30
Kailash Nadh 3b7902802e Add data privacy export / wipe features (aimed at GDPR compliance).
- Toggle options to enable self-service data export and wipe
  options on the public unsubscription page. Subscribers can get
  a copy of all data on them e-mailed to them as JSON, or
  instantly wipe all their data.
- Refactor "unsubscribe" pages and URIs to "subscription".
- Add export icon to subscriber admin view.
2019-07-21 19:21:23 +05:30
Kailash Nadh 7d9758c3f5 Refactor "error" view to a generic "message" 2019-07-18 12:44:46 +05:30
Kailash Nadh 7eeb813f19 Add embedding of static assets for standalone dist binary
This is a big commit that involves drastic changes to how static assets
(.sql and template files, the whole frontend bundle) are handled.
listmonk distribution should be a self-contained single binary
distribution, hence all static assets should be bundled. After
evaluating several solutions, srtkkou/zgok seemed like the best bet but
it lacked several fundamental features, namely the ability to fall back
to the local filesystem in the absence of embedded assets (for instance,
in the dev mode). Moreover, there was a lot of room for cleanup.

After a PR went unanswered, github.com/knadh/stuffbin was created. Just
like zgok, this enables arbitrary files and assets to be embedded into a
compiled Go binary that can be read during runtime. These changes
followed:

- Compress and embed all static files into the binary during
  the build (Makefile) to make it standalone and distributable
- Refactor static paths (/public/* for public facing assets,
  /frontend/* for the frontend app's assets)
- Add 'logo_url' to config
- Remove 'assets_path' from config
- Tweak yarn build to not produce symbol maps and override
  the default /static (%PUBLIC_URL%) path to /frontend
2019-01-03 16:48:47 +05:30
Kailash Nadh b7d5a4d8c8 Add no-cache header to pixel tracker image 2018-11-29 15:27:21 +05:30
Kailash Nadh 6c5cf0da7a Add support for campaign view tracking with {{ TrackView }} pixel tag 2018-11-02 13:20:32 +05:30
Kailash Nadh 0fb9c6aed1 Change unsubscribe (click instead of onload) behaviour and language 2018-10-31 18:22:54 +05:30
Kailash Nadh 3ab21383b1 Fresh start 2018-10-25 19:21:47 +05:30