From acdb9ff8d7644459e693f47ae08e55f37bc73fda Mon Sep 17 00:00:00 2001 From: dylan Date: Sun, 28 Dec 2025 17:32:17 +0000 Subject: [PATCH] updated to differentiate between generic and special feeds --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 9b287ba..c387272 100644 --- a/index.js +++ b/index.js @@ -78,7 +78,13 @@ export default async function now() { .replace('{instance}', item.instance || '') } - const latest = await handler(feedUrl || { ...item, feedUrl }) + // generic handlers expect just feedUrl string, special handlers expect config object + const handlerParam = ['rss', 'atom', 'json', 'mastodon', 'maloja'].includes( + item.feedType, + ) + ? feedUrl + : { ...item, feedUrl } + const latest = await handler(handlerParam) console.log(`${item.id}: ${latest.text}`) console.log(`${item.id} URL: ${latest.url}`)