mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
refactor: return set in a different way
This commit is contained in:
parent
7eab62b9a9
commit
19069c0417
1 changed files with 1 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ async function getFollowedPubkeys(pubkey: string, signal?: AbortSignal): Promise
|
||||||
/** Get pubkeys the user follows, including the user's own pubkey. */
|
/** Get pubkeys the user follows, including the user's own pubkey. */
|
||||||
async function getFeedPubkeys(pubkey: string): Promise<Set<string>> {
|
async function getFeedPubkeys(pubkey: string): Promise<Set<string>> {
|
||||||
const authors = await getFollowedPubkeys(pubkey);
|
const authors = await getFollowedPubkeys(pubkey);
|
||||||
return new Set([...authors, pubkey]);
|
return authors.add(pubkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getAncestors(store: NStore, event: NostrEvent, result: NostrEvent[] = []): Promise<NostrEvent[]> {
|
async function getAncestors(store: NStore, event: NostrEvent, result: NostrEvent[] = []): Promise<NostrEvent[]> {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue