forked from nostr/nostrweb
feed: fix too many subscriptions
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.
parent
b67f59ebec
commit
86ac5e47fa
|
@ -59,6 +59,12 @@ export const sub24hFeed = (onEvent: SubCallback) => {
|
||||||
sub({
|
sub({
|
||||||
cb: (evt, relay) => {
|
cb: (evt, relay) => {
|
||||||
onEvent(evt, relay);
|
onEvent(evt, relay);
|
||||||
|
if (
|
||||||
|
evt.kind !== 1
|
||||||
|
|| pubkeys.has(evt.pubkey)
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
subOnce({ // get profil data
|
subOnce({ // get profil data
|
||||||
relay,
|
relay,
|
||||||
cb: onEvent,
|
cb: onEvent,
|
||||||
|
|
Loading…
Reference in New Issue