Refine domain, integrate into app
tests / tests (push) Failing after 5m14s

This commit is contained in:
Jon Staab
2026-06-19 12:50:34 -07:00
parent 1bd62d3024
commit e2a6ef21cd
115 changed files with 1354 additions and 3176 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
import {BLOSSOM_SERVERS, asDecryptedEvent, readList} from "@welshman/util"
import type {TrustedEvent} from "@welshman/util"
import {BLOSSOM_SERVERS} from "@welshman/util"
import {BlossomServerList} from "@welshman/domain"
import {DerivedPlugin} from "./base.js"
import {Network} from "./network.js"
import type {IApp} from "../app.js"
@@ -8,12 +8,12 @@ import type {IApp} from "../app.js"
* Blossom server lists (kind 10063), keyed by pubkey. Loaded via the outbox
* model (the author's write relays), so it depends on the relay-list collection.
*/
export class BlossomServerLists extends DerivedPlugin<ReturnType<typeof readList>> {
export class BlossomServerLists extends DerivedPlugin<BlossomServerList> {
constructor(app: IApp) {
super(app, {
filters: [{kinds: [BLOSSOM_SERVERS]}],
eventToItem: (event: TrustedEvent) => readList(asDecryptedEvent(event)),
getKey: list => list.event.pubkey,
eventToItem: BlossomServerList.factory(app.user?.signer),
getKey: list => list.author(),
})
}