This commit is contained in:
@@ -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(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user