From 0394986681b0cea1098d06dcd049ce3b67d47761 Mon Sep 17 00:00:00 2001 From: Nick Gerakines <12125+ngerakines@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:48:07 -0500 Subject: [PATCH] chore: Updating atmosphere dev feed matcher --- etc/atmosphere_dev.rhai | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/etc/atmosphere_dev.rhai b/etc/atmosphere_dev.rhai index 728937f..b9674d8 100644 --- a/etc/atmosphere_dev.rhai +++ b/etc/atmosphere_dev.rhai @@ -4,25 +4,32 @@ if rtype != "app.bsky.feed.post" { return false; } -const SEARCH = [ - ["bluesky"], - ["bsky"], +const KEYWORDS = [ + ["atproto"], + ["feed", "generator"], + ["pds"], + ["jetstream"], + ["firehose"], +]; +const TAGS = [ ["atproto"], - ["atmosphere"], ["feed", "generator"], - ["at proto"], ["pds"], + ["bluesky"], + ["bsky"], + ["atmosphere"], ]; const URLS = [ "https://atproto.com/", "https://github.com/bluesky-social/", + "https://docs.bsky.app/", ]; let text = event?.commit?.record?.text ?? ""; let text_normalized = text.to_lower(); -for needle in SEARCH { +for needle in KEYWORDS { if sequence_matches(needle, text_normalized) { return build_aturi(event); } @@ -55,7 +62,7 @@ for facet in event?.commit?.record?.facets ?? [] { "app.bsky.richtext.facet#tag" => { let tag = feature?["tag"] ?? ""; let tag_normalized = tag.to_lower(); - for needle in SEARCH { + for needle in TAGS { if sequence_matches(needle, tag_normalized) { return build_aturi(event); } -- 2.51.2