Commit Graph

21 Commits

Author SHA1 Message Date
Kailash Nadh 276942ab91 Replace outdated UUID lib 2020-03-07 20:37:48 +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 32a543bf4f Fix incorrect campaign API response when there are no campaigns 2019-12-06 21:39:18 +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 649d1b11f0 Fix 'send later' switch + date not updating on campaign edit 2019-08-26 23:45:18 +05:30
Kailash Nadh 81d3046374 Refactor Messenger/Emailer to accept attachments 2019-07-18 12:40:48 +05:30
Kailash Nadh cfec13c589 Optimize campaign and subscriber queries
- Simplify campaigns querying to separate statistics gather into
  a separate query for lazy loading.
- Simplify subscribers query to separate list fetching into
  a separate query for lazy loading.
2019-04-01 17:07:24 +05:30
Kailash Nadh 93c952082c Refactor campaigns query into two: 'query' and 'get' 2019-03-30 12:38:02 +05:30
Kailash Nadh 178604dbbf Refactor campaigns view
- Fix sorting issues
- Add status filter
- Add name + subject search
2019-03-28 17:17:51 +05:30
Kailash Nadh ffd43cec6c Rename 'runner.Runner' to 'manager.Manager' 2018-12-19 12:03:13 +05:30
Kailash Nadh c24c19b120 Add admin e-mail notifications.
- Add notifications for campaign state change
- Add notifications for import state change

Related changes.
- Add a new 'templates' directory with HTML templates
- Move the static campaign template as a .tpl file into it
- Change Messenger.Push() to accept multiple recipients
- Change exhaustCampaign()'s behaviour to pass metadata to admin emails
2018-11-28 13:29:57 +05:30
Kailash Nadh 1673cba964 Fix campaign send rate calculation 2018-11-27 11:44:54 +05:30
Kailash Nadh 6a1ee77dcf Fixed message rendering in test messages 2018-11-06 08:52:20 +05:30
Kailash Nadh ad8787cab3 Load global configuration into the frontend as a JS dict using a <script> inclusion 2018-11-02 23:33:00 +05:30
Kailash Nadh acee18c58c Refactor dummyUser struct for use in multiple places 2018-10-31 19:50:26 +05:30
Kailash Nadh b4e6ed658a Refactor and fix obsolete campaign template compilation and validation routines 2018-10-31 19:42:07 +05:30
Kailash Nadh 81953d68d0 - Refactor and move template compilation from runner to models.Campaign to support adhoc template funcs
- Add support for {{ Track "https://url.com" }} in templates to register and track links
2018-10-31 18:24:21 +05:30
Kailash Nadh d89b22e757 Add 'send campaign test' feature 2018-10-29 15:20:49 +05:30
Kailash Nadh a1b5a39cfb Added preview component with preview support for campaigns and templates 2018-10-26 11:18:17 +05:30
Kailash Nadh 3ab21383b1 Fresh start 2018-10-25 19:21:47 +05:30