feed: fix too many subscriptions
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details

fetch profile meta data only for future notes for pubkeys that are
not known of if the event kind is a text note, but not for reactions
or meta data.

this drastically reduces one time subscriptions.
pull/77/head
OFF0 10 months ago
parent b67f59ebec
commit 86ac5e47fa
Signed by: offbyn
GPG Key ID: 94A2F643C51F37FA

@ -59,6 +59,12 @@ export const sub24hFeed = (onEvent: SubCallback) => {
sub({
cb: (evt, relay) => {
onEvent(evt, relay);
if (
evt.kind !== 1
|| pubkeys.has(evt.pubkey)
) {
return;
}
subOnce({ // get profil data
relay,
cb: onEvent,

Loading…
Cancel
Save