mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Add shakespeare and template t-tags to kind 31990 app events
This commit is contained in:
1 file changed
+15
@@ -1,4 +1,5 @@
|
||||
import git from 'isomorphic-git';
|
||||
import { DotAI } from './DotAI';
|
||||
import { NostrURI } from './NostrURI';
|
||||
import type { JSRuntimeFS } from './JSRuntime';
|
||||
|
||||
@@ -66,6 +67,20 @@ export async function buildAppEvent(
|
||||
}
|
||||
}
|
||||
|
||||
// Add t-tags for categorization (shakespeare + template name)
|
||||
if (opts?.fs && opts.cwd) {
|
||||
tags.push(['t', 'shakespeare']);
|
||||
try {
|
||||
const dotAI = new DotAI(opts.fs, opts.cwd);
|
||||
const template = await dotAI.readTemplate();
|
||||
if (template) {
|
||||
tags.push(['t', template.name.toLowerCase()]);
|
||||
}
|
||||
} catch {
|
||||
// Template not found, skip
|
||||
}
|
||||
}
|
||||
|
||||
// If origin remote is a nostr:// URI owned by the given pubkey, add an "a" tag for the repo
|
||||
if (opts?.fs && opts.cwd && opts.pubkey) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user