refactor: include relays in kind3

This commit is contained in:
2024-01-30 22:38:23 +00:00
parent ad8d0af976
commit 07510d92ca
6 changed files with 63 additions and 42 deletions

View File

@ -257,9 +257,12 @@ export class EventPublisher {
return await this.#sign(eb);
}
async contactList(tags: Array<[string, string]>) {
async contactList(tags: Array<[string, string]>, relays?: Record<string, RelaySettings>) {
const eb = this.#eb(EventKind.ContactList);
tags.forEach(a => eb.tag(a));
if (relays) {
eb.content(JSON.stringify(relays));
}
return await this.#sign(eb);
}