make watch hooks cumulative

This commit is contained in:
Clément DOUIN 2024-02-03 22:30:15 +01:00
parent 83306d5f6a
commit a945e1bf2f
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72
4 changed files with 19 additions and 5 deletions

View file

@ -13,7 +13,7 @@ jobs:
- name: Install Nix
uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-22.11
nix_path: nixpkgs=channel:nixos-23.11
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v12

View file

@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- Changed `envelope.watch.{event}.{hook}`: hooks can now be cumulated. For example it is possible to send a system notification and execute a shell command when receiving a new envelope:
```toml
envelope.watch.received.notify.summary = "New message from {sender}"
envelope.watch.received.notify.body = "{subject}"
envelope.watch.received.cmd = "echo {id} >> /tmp/new-email-counter"
```
### Fixed
- Fixed bug that was preventing watch placeholders to be replaced when using shell command hook.
## [1.0.0-beta.2] - 2024-01-27
### Added

3
Cargo.lock generated
View file

@ -1217,8 +1217,7 @@ dependencies = [
[[package]]
name = "email-lib"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fe5898733e36f6faf030398be1481b8e80ed041372236a64bf7da0e05eb1223"
source = "git+https://git.sr.ht/~soywod/pimalaya#f9a55e764282f1986201e226aacedf13f2e0bc80"
dependencies = [
"advisory-lock",
"anyhow",

View file

@ -120,7 +120,8 @@ clap_mangen = "0.2"
console = "0.15.2"
dialoguer = "0.10.2"
dirs = "4.0"
email-lib = { version = "=0.21.0", default-features = false }
# email-lib = { version = "=0.21.0", default-features = false }
email-lib = { git = "https://git.sr.ht/~soywod/pimalaya", default-features = false }
email_address = "0.2.4"
env_logger = "0.8"
erased-serde = "0.3"
@ -155,4 +156,4 @@ version = "0.29"
features = ["bundled"]
[target.'cfg(not(windows))'.dependencies.coredump]
version = "=0.1.2"
version = "0.1"