diff options
| author | eltrac <hi@eltr.ac> | 2026-09-16 17:03:51 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-09-19 12:10:45 +0800 |
| commit | ef9ca471427b636c1fa42244923a04c548a04d82 (patch) | |
| tree | c152d5cc9e5269f5b0bc1eefdcce5869b7197919 /resources | |
| parent | 41ad0b78bcac340d3b8640be30b9e6f2dcf9bf2b (diff) | |
processor, webhook: send webhooks with customizable payload
- processor will call hook functions with webmention data
- refactor webhook.clj massively
- add dynamic parameter substitution for urls, e.g. {source} {target}
{event}......
- add config option :webhook-request, a function with parameters [hook,
data] that returns a map (resembling {:headers ... :body ...}).
webhook.clj uses this function to generate payload.
- allow map besids URL string in config option :webhook. if it's a URL,
sends webhook request to it with payload generated by :webhook-request;
if it's a map, it should be like {:url ... :request-fn ...}, which
specifies a payload generator.
- add request-fn preset :ntfy
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/config.edn | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/resources/config.edn b/resources/config.edn index d007c87..e5076eb 100644 --- a/resources/config.edn +++ b/resources/config.edn @@ -7,4 +7,5 @@ :on-create [] :on-update [] :on-delete []} + :webhook-request-fn nil :feed-length 8} |
