feat: Phase 5 — filtres, actions Ntfy, outgoing webhooks, state file
CI / test (push) Successful in 2m34s

- Filtres avancés: drop, set_priority, add_tag avec wildcard * (filter_outgoing.v)
- Notifications structurées: click_url + actions (ntfy.v + sources/event.v)
- Webhook sortant: Slack, Discord, JSON (filter_outgoing.v)
- Fichier d'état: persistance poll_state + silence_until (filter_outgoing.v)
- Config: sections filters, outgoing, state (config.v)
- Tests: 9 nouveaux tests unitaires (filter_outgoing_test.v)
- Docs: ROADMAP Phase 5 4/8, version 0.5.0
This commit is contained in:
2026-08-03 17:41:53 -04:00
parent 5d0db9478c
commit 4150c56054
9 changed files with 422 additions and 30 deletions
+12
View File
@@ -35,6 +35,18 @@ pub fn (c NtfyClient) publish(event sources.Event) ! {
if c.auth_token != '' {
header.add(.authorization, 'Bearer ${c.auth_token}')
}
// v0.5 — Click URL (opens when notification is tapped)
if event.click_url != '' {
header.add_custom('X-Click', event.click_url)!
}
// v0.5 — Action buttons
if event.actions.len > 0 {
mut action_strs := []string{}
for a in event.actions {
action_strs << '${a.action}, ${a.label}, ${a.url}${if a.clear { ', clear=true' } else { '' }}'
}
header.add_custom('X-Actions', action_strs.join('; '))!
}
c.logger.debug('ntfy', 'publish',
'POST ${url} priority=${event.priority} tags=${join_tags(event.tags)}')