Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion xExtension-Webhook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ Customize the webhook payload using placeholders:
"date": "{date}",
"timestamp": "{date_timestamp}",
"author": "{author}",
"tags": "{tags}"
"tags": "{tags}",
"user": "{user}"
}
```

Expand All @@ -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

Expand Down
4 changes: 4 additions & 0 deletions xExtension-Webhook/configure.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ declare(strict_types=1);
<td><code>{tags}</code></td>
<td><?= _t('ext.webhook.http_body_placeholder_tags_description') ?></td>
</tr>
<tr>
<td><code>{user}</code></td>
<td><?= _t('ext.webhook.http_body_placeholder_user_description') ?></td>
</tr>
</table>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions xExtension-Webhook/extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions xExtension-Webhook/i18n/en/ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down
1 change: 1 addition & 0 deletions xExtension-Webhook/i18n/fr/ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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é)',
Expand Down
2 changes: 1 addition & 1 deletion xExtension-Webhook/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down