From 0cf23e9102fe74b3f79c5badb3b0d7a730ded34f Mon Sep 17 00:00:00 2001 From: syui Date: Thu, 11 Dec 2025 09:38:33 +0900 Subject: [PATCH] fix feed --- envs/feed | 2 +- patching/200-feed-generator-custom.patch | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/envs/feed b/envs/feed index 60f82c3..564121a 100644 --- a/envs/feed +++ b/envs/feed @@ -3,5 +3,5 @@ FEEDGEN_LISTENHOST=0.0.0.0 FEEDGEN_SQLITE_LOCATION=/data/db.sqlite FEEDGEN_HOSTNAME=feed.syu.is FEEDGEN_PUBLISHER_DID=did:plc:6qyecktefllvenje24fcxnie -FEEDGEN_SUBSCRIPTION_ENDPOINT=ws://bgs:2470 +FEEDGEN_SUBSCRIPTION_ENDPOINT=wss://bgs.syu.is FEEDGEN_SERVICE_DID=did:web:feed.syu.is diff --git a/patching/200-feed-generator-custom.patch b/patching/200-feed-generator-custom.patch index 8c68f4c..5bdd1e9 100644 --- a/patching/200-feed-generator-custom.patch +++ b/patching/200-feed-generator-custom.patch @@ -181,14 +181,17 @@ diff --git a/src/subscription.ts b/src/subscription.ts index 0422a03..d591ef9 100644 --- a/src/subscription.ts +++ b/src/subscription.ts -@@ -19,10 +19,6 @@ export class FirehoseSubscription extends FirehoseSubscriptionBase { - +@@ -19,10 +19,10 @@ export class FirehoseSubscription extends FirehoseSubscriptionBase { + const postsToDelete = ops.posts.deletes.map((del) => del.uri) const postsToCreate = ops.posts.creates -- .filter((create) => { + .filter((create) => { - // only alf-related posts - return create.record.text.toLowerCase().includes('alf') -- }) ++ // posts starting with / or @ai ++ return create.record.text.match('^/[a-z]') || create.record.text.match('^@ai'); + }) .map((create) => { - // map alf-related posts to a db row +- // map alf-related posts to a db row ++ // map posts to a db row return {