diff --git a/xExtension-Webhook/README.md b/xExtension-Webhook/README.md index 26113dca..a4f55743 100644 --- a/xExtension-Webhook/README.md +++ b/xExtension-Webhook/README.md @@ -63,8 +63,7 @@ Customize the webhook payload using placeholders: "feed": "{feed_name}", "url": "{url}", "content": "{content}", - "date": "{date}", - "timestamp": "{date_timestamp}", + "published": "{date_published}", "author": "{author}", "tags": "{tags}", "user": "{user}" @@ -78,12 +77,13 @@ Customize the webhook payload using placeholders: | `{title}` | Article title | | `{url}` | Article URL | | `{content}` | Article content (HTML) | -| `{date}` | Publication date (string) | -| `{date_timestamp}` | Publication date as Unix timestamp | +| `{date_published}` | Publication date (ISO 8601) | +| `{date_received}` | Date received by FreshRSS (ISO 8601) | +| `{date_modified}` | Last modified date (ISO 8601, `null` if never modified) | +| `{date_user_modified}` | Last user-modified date (ISO 8601, `null` if never modified) | | `{author}` | Article authors | | `{feed_name}` | Feed name | | `{feed_url}` | Feed URL | -| `{thumbnail_url}` | Thumbnail (image) URL | | `{tags}` | Article tags (separated by " #") | | `{user}` | Username in FreshRSS | @@ -129,7 +129,7 @@ Customize the webhook payload using placeholders: "title": "{title}", "url": "{url}", "feed": "{feed_name}", - "timestamp": "{date_timestamp}" + "published": "{date_published}" } } ``` diff --git a/xExtension-Webhook/extension.php b/xExtension-Webhook/extension.php index e21b5f8f..98b7ab9d 100644 --- a/xExtension-Webhook/extension.php +++ b/xExtension-Webhook/extension.php @@ -220,7 +220,7 @@ private function sendArticle(FreshRSS_Entry $entry): void { '{feed_name}' => htmlspecialchars_decode($entry->feed()?->name() ?? '', ENT_QUOTES), '{feed_url}' => htmlspecialchars_decode($entry->feed()?->url() ?? '', ENT_QUOTES), '{url}' => htmlspecialchars_decode($entry->link(), ENT_QUOTES), - '{content}' => htmlspecialchars_decode($entry->content(), ENT_QUOTES), + '{content}' => $entry->content(), '{date_published}' => timestampToMachineDate($entry->date(raw: true)), '{date_received}' => timestampToMachineDate($entry->dateAdded(raw: true)), '{date_modified}' => $entry->lastModified() === null ? null : timestampToMachineDate($entry->lastModified()), diff --git a/xExtension-Webhook/metadata.json b/xExtension-Webhook/metadata.json index 530bbb9b..7ab87a86 100644 --- a/xExtension-Webhook/metadata.json +++ b/xExtension-Webhook/metadata.json @@ -2,7 +2,7 @@ "name": "Webhook", "author": "Lukas Melega, Ryahn", "description": "Send custom webhook when new article appears (and matches custom criteria)", - "version": "0.2.5", + "version": "0.2.6", "entrypoint": "Webhook", "type": "user", "compatibility": "1.28.2"