diff --git a/xExtension-Webhook/README.md b/xExtension-Webhook/README.md
index 53bc7ed2..4de1ab7c 100644
--- a/xExtension-Webhook/README.md
+++ b/xExtension-Webhook/README.md
@@ -62,7 +62,8 @@ Customize the webhook payload using placeholders:
"date": "{date}",
"timestamp": "{date_timestamp}",
"author": "{author}",
- "tags": "{tags}"
+ "tags": "{tags}",
+ "user": "{user}"
}
```
@@ -80,6 +81,7 @@ Customize the webhook payload using placeholders:
| `{feed_url}` | Feed URL |
| `{thumbnail_url}` | Thumbnail (image) URL |
| `{tags}` | Article tags (separated by " #") |
+| `{user}` | Username in FreshRSS |
## 🎯 Use Cases
diff --git a/xExtension-Webhook/configure.phtml b/xExtension-Webhook/configure.phtml
index 0dec8696..0ba94807 100644
--- a/xExtension-Webhook/configure.phtml
+++ b/xExtension-Webhook/configure.phtml
@@ -113,6 +113,10 @@ declare(strict_types=1);
{tags} |
= _t('ext.webhook.http_body_placeholder_tags_description') ?> |
+
+ {user} |
+ = _t('ext.webhook.http_body_placeholder_user_description') ?> |
+
diff --git a/xExtension-Webhook/extension.php b/xExtension-Webhook/extension.php
index 96d175ae..891b06eb 100644
--- a/xExtension-Webhook/extension.php
+++ b/xExtension-Webhook/extension.php
@@ -226,6 +226,7 @@ private function sendArticle(FreshRSS_Entry $entry): void {
'{date_user_modified}' => $entry->lastUserModified() === null ? null : timestampToMachineDate($entry->lastUserModified()),
'{author}' => htmlspecialchars_decode($entry->authors(true), ENT_QUOTES),
'{tags}' => htmlspecialchars_decode($entry->tags(true), ENT_QUOTES),
+ '{user}' => Minz_User::name() ?? '',
];
$body = $this->replacePlaceholdersRecursive($body, $replacements);
diff --git a/xExtension-Webhook/i18n/en/ext.php b/xExtension-Webhook/i18n/en/ext.php
index 29eabee0..dbad9b4e 100644
--- a/xExtension-Webhook/i18n/en/ext.php
+++ b/xExtension-Webhook/i18n/en/ext.php
@@ -21,6 +21,7 @@
'http_body_placeholder_feed_description' => 'Name of the feed',
'http_body_placeholder_feed_url_description' => 'URL of the feed',
'http_body_placeholder_tags_description' => 'Article tags (string, separated by " #")',
+ 'http_body_placeholder_user_description' => 'Username in FreshRSS',
'http_body_placeholder_date_published_description' => 'Publication date (ISO 8601)',
'http_body_placeholder_date_received_description' => 'Date received by FreshRSS (ISO 8601)',
'http_body_placeholder_date_modified_description' => 'Last modified date (ISO 8601, null if never modified)',
diff --git a/xExtension-Webhook/i18n/fr/ext.php b/xExtension-Webhook/i18n/fr/ext.php
index 1c358926..a03ab079 100644
--- a/xExtension-Webhook/i18n/fr/ext.php
+++ b/xExtension-Webhook/i18n/fr/ext.php
@@ -21,6 +21,7 @@
'http_body_placeholder_feed_description' => 'Nom du flux',
'http_body_placeholder_feed_url_description' => 'URL du flux',
'http_body_placeholder_tags_description' => 'Étiquettes de l’article (chaîne, séparées par « # »)',
+ 'http_body_placeholder_user_description' => 'Utilisateur chez FreshRSS',
'http_body_placeholder_date_published_description' => 'Date de publication (ISO 8601)',
'http_body_placeholder_date_received_description' => 'Date de réception par FreshRSS (ISO 8601)',
'http_body_placeholder_date_modified_description' => 'Date de dernière modification (ISO 8601, null si jamais modifié)',
diff --git a/xExtension-Webhook/metadata.json b/xExtension-Webhook/metadata.json
index 6fe12160..daf152ac 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.1",
+ "version": "0.2.2",
"entrypoint": "Webhook",
"type": "user",
"compatibility": "1.28.2"