ai/at
1
0
This commit is contained in:
2025-12-11 09:38:33 +09:00
parent 3b83ae1e8a
commit 0cf23e9102
2 changed files with 9 additions and 6 deletions

View File

@@ -3,5 +3,5 @@ FEEDGEN_LISTENHOST=0.0.0.0
FEEDGEN_SQLITE_LOCATION=/data/db.sqlite FEEDGEN_SQLITE_LOCATION=/data/db.sqlite
FEEDGEN_HOSTNAME=feed.syu.is FEEDGEN_HOSTNAME=feed.syu.is
FEEDGEN_PUBLISHER_DID=did:plc:6qyecktefllvenje24fcxnie 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 FEEDGEN_SERVICE_DID=did:web:feed.syu.is

View File

@@ -181,14 +181,17 @@ diff --git a/src/subscription.ts b/src/subscription.ts
index 0422a03..d591ef9 100644 index 0422a03..d591ef9 100644
--- a/src/subscription.ts --- a/src/subscription.ts
+++ b/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 postsToDelete = ops.posts.deletes.map((del) => del.uri)
const postsToCreate = ops.posts.creates const postsToCreate = ops.posts.creates
- .filter((create) => { .filter((create) => {
- // only alf-related posts - // only alf-related posts
- return create.record.text.toLowerCase().includes('alf') - 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((create) => {
// map alf-related posts to a db row - // map alf-related posts to a db row
+ // map posts to a db row
return { return {