feedkeeper 0.47.0 → 0.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feedkeeper",
3
- "version": "0.47.0",
3
+ "version": "0.47.1",
4
4
  "description": "A lightweight, self-hosted RSS reader and remote MCP server for your news, blogs, and AI workflows.",
5
5
  "keywords": [
6
6
  "rss",
@@ -0,0 +1,33 @@
1
+ -- Notify subscribers when feed media metadata (description, artwork_url, detected_kind) changes
2
+ DROP TRIGGER IF EXISTS trg_changes_feed_update;
3
+ CREATE TRIGGER trg_changes_feed_update
4
+ AFTER UPDATE OF url, title, site_url, poll_interval_minutes, last_error, description, artwork_url, detected_kind ON feeds
5
+ WHEN OLD.url IS NOT NEW.url
6
+ OR OLD.title IS NOT NEW.title
7
+ OR OLD.site_url IS NOT NEW.site_url
8
+ OR OLD.poll_interval_minutes IS NOT NEW.poll_interval_minutes
9
+ OR OLD.last_error IS NOT NEW.last_error
10
+ OR OLD.description IS NOT NEW.description
11
+ OR OLD.artwork_url IS NOT NEW.artwork_url
12
+ OR OLD.detected_kind IS NOT NEW.detected_kind
13
+ BEGIN
14
+ INSERT INTO changes (user_id, entity, entity_id, op, seq, changed_at)
15
+ SELECT s.user_id, 'subscription', NEW.id, 'upsert', (SELECT COALESCE(MAX(seq), 0) + 1 FROM changes WHERE user_id = s.user_id), strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
16
+ FROM subscriptions s
17
+ WHERE s.feed_id = NEW.id
18
+ ON CONFLICT (user_id, entity, entity_id) DO UPDATE SET op = excluded.op, seq = excluded.seq, changed_at = excluded.changed_at;
19
+ END;
20
+
21
+ -- Enqueue a sync upsert for subscriptions whose feed already received artwork_url or description before this trigger existed
22
+ INSERT INTO changes (user_id, entity, entity_id, op, seq, changed_at)
23
+ SELECT
24
+ s.user_id,
25
+ 'subscription',
26
+ f.id,
27
+ 'upsert',
28
+ (SELECT COALESCE(MAX(seq), 0) + 1 FROM changes WHERE user_id = s.user_id),
29
+ strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
30
+ FROM subscriptions s
31
+ JOIN feeds f ON f.id = s.feed_id
32
+ WHERE f.artwork_url IS NOT NULL OR f.description IS NOT NULL
33
+ ON CONFLICT (user_id, entity, entity_id) DO UPDATE SET op = excluded.op, seq = excluded.seq, changed_at = excluded.changed_at;
@@ -110,11 +110,13 @@ async function trySuggestReplacementForGoneFeed(feed) {
110
110
  }
111
111
  /** One attempt; the queue owns retries, admission, single-flight and the total deadline. */
112
112
  async function pollAttempt(feed, signal, interactive) {
113
+ // Backfill show artwork and description once for feeds created before 0.47.0 even if the server returns 304 for cached validators.
114
+ const needsShowBackfill = !feed.artwork_url && !feed.description;
113
115
  let fetched;
114
116
  try {
115
117
  fetched = await fetchFeed(feed.url, {
116
- etag: feed.etag ?? undefined,
117
- lastModified: feed.last_modified ?? undefined,
118
+ etag: needsShowBackfill ? undefined : feed.etag ?? undefined,
119
+ lastModified: needsShowBackfill ? undefined : feed.last_modified ?? undefined,
118
120
  signal,
119
121
  priority: interactive ? "interactive" : "background",
120
122
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedkeeper/server",
3
- "version": "0.47.0",
3
+ "version": "0.47.1",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }