From 17af17a4c43ec11a446267c841ee5db4f7dc8b9e 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 +- envs/jetstream | 2 +- patching/200-feed-generator-custom.patch | 13 ++++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/envs/feed b/envs/feed index 60f82c3..0342364 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=ws://bgs.syu.is FEEDGEN_SERVICE_DID=did:web:feed.syu.is diff --git a/envs/jetstream b/envs/jetstream index 324bbd7..950a3c9 100644 --- a/envs/jetstream +++ b/envs/jetstream @@ -1,4 +1,4 @@ -JETSTREAM_WS_URL=wss://bgs.${host}/xrpc/com.atproto.sync.subscribeRepos +JETSTREAM_WS_URL=ws://bgs.${host}/xrpc/com.atproto.sync.subscribeRepos JETSTREAM_DATA_DIR=/data JETSTREAM_LISTEN_ADDR=:6008 JETSTREAM_METRICS_LISTEN_ADDR=:6009 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 {