This is a major feature that builds upon the `Messenger` interface
that has been in listmonk since its inception (with SMTP as the only
messenger). This commit introduces a new Messenger implementation, an
HTTP "postback", that can post campaign messages as a standard JSON
payload to arbitrary HTTP servers. These servers can in turn push them
to FCM, SMS, or any or any such upstream, enabling listmonk to be a
generic campaign messenger for any type of communication, not just
e-mails.
Postback HTTP endpoints can be defined in settings and they can be
selected on campaigns.
Example given for CSV import on Import.vue is incorrect since
field `attributes` value is not a valid JSON. Previous example
copy pasted was throwing CSV parse error.
Vue's inbuilt dev server can be configured to proxy API for
development instead of directing developers to setup Nginx proxy.
Additionally this commit also adds an option to configure frontend port
on which dev server runs. Sample env config file is under
`frontend/.env.sample`, it can be copied to either `frontend/.env` or `frontend/.env.local`.
Available options are
LISTMONK_FRONTEND_PORT - Configure frontend dev server port (defaults to 8080)
LISTMONK_API_URL - Configure API server URL (defaults to http://127.0.0.1:9000)
Since env variables are sourced to current session we are prefixing it with `LISTMONK_`.
Git tag version injected via Makefile is incorrect since `git describe`
doesn't consider annotated tags but all the recent releases are lightweight tags.
So instead use `git describe --tags` command which also considers recent lightweight tag.
installations.
In v0.7.0's automatic DB migration, the default value 'enabled'
of subscribers.status was missed incorrectly, causing imports to
break on auto-upgraded versions. This is now fixed by explictly
inserting the status field in CSV imports.
- A check for new versions on the GitHub releases pages happens
once every 24 hours. When a new version is available, a notice
is displayed on the admin UI.
This removes the Nginx dependency for protecting admin pages.
BasicAuth is configured in config.toml. This is a "temporary"
setup until a full fledged auth mechanism is added.
- Add missing `app.root_url` key in migration.
- Register `/settings` handler in the backend.
- Add dummy dots in secret fields on the UI for visibility.
- On boot, the app now checks if the DB version matches its
expected version and refuses to start if there are pending
migrations to be run.
- The new `--upgrade` flag runs data migrations from the last
recorded migration (in the settings table) to the latest one
in the binary.
- Migrations are DB/arbitrary logic functions in .go files in
internal/migrations.
- All migration functions are idempotent.
- Added as a setting in the settings UI.
- Refactor Messenger.Push() method to accept messenger.Message{}
instead of a growing number of positional arguments.