···8899To match on likes, we need to make 2 changes:
10101111-1. Add the `aturi` attribute to the feed configuration.
1111+1. Add the `aturi` attribute to the feed configuration for the matcher.
12122. Set the environment value `COLLECTIONS` to include `app.bsky.feed.like,app.bsky.feed.post`. When not explicitly set, the default value is `app.bsky.feed.post`.
13131414## Example
···2222- uri: "at://did:plc:decafbad/app.bsky.feed.generator/my_popular_posts"
2323 name: "My popular posts"
2424 description: "Posts that I've made that have been liked."
2525- aturi: "$.commit.record.subject.uri"
2625 matchers:
2726 - path: "$.commit.record.subject.uri"
2827 value: "at://did:plc:decafbad/app.bsky.feed.post/"
2928 type: prefix
2929+ aturi: "$.commit.record.subject.uri"
3030```
3131
+11-1
docs/playbook-rhai.md
···3232result
3333```
34343535+## Provided Methods
3636+3737+The following methods are available to rhai scripts:
3838+3939+* `build_aturi(event: Event) -> String` - Build an AT-URI from an event. For feed posts, this composes an AT-URI from the event DID, commit collection, and commit rkey.
4040+3541## Usage
36423743The feed matcher type `rhai` is used with a `source` attribute that points to an rhai script file.
···65716672let root_uri = event?.commit?.record?.reply?.root?.uri;
67736868-result.matched = root_uri.starts_with("at://did:plc:cbkjy5n7bk3ax2wplmtjofq2/app.bsky.feed.post/");
7474+result.matched = `${root_uri}`.starts_with("at://did:plc:cbkjy5n7bk3ax2wplmtjofq2/app.bsky.feed.post/");
7575+7676+if result.matched {
7777+ result.aturi = build_aturi(event);
7878+}
69797080result
7181```