mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-26 03:28:38 +02:00
fix build
This commit is contained in:
@@ -76,7 +76,7 @@ export default class BatchRelationLoader {
|
||||
{ leading: false, trailing: true },
|
||||
);
|
||||
|
||||
private handleEvent(event: NostrEvent) {
|
||||
handleEvent(event: NostrEvent) {
|
||||
// add event to cache
|
||||
const updateIds = new Set<string>();
|
||||
for (const tag of event.tags) {
|
||||
@@ -93,7 +93,7 @@ export default class BatchRelationLoader {
|
||||
|
||||
for (const id of updateIds) this.onEventUpdate.next(id);
|
||||
}
|
||||
private handleEOSE() {
|
||||
handleEOSE() {
|
||||
// resolve all pending from the last request
|
||||
for (const [uid, defer] of this.pending) {
|
||||
defer.resolve(this.references.get(uid));
|
||||
|
@@ -58,7 +58,7 @@ class EventReactionsService {
|
||||
|
||||
requestReactions(eventUID: string, urls: Iterable<string | URL | AbstractRelay>, alwaysRequest = true) {
|
||||
const subject = this.subjects.get(eventUID);
|
||||
if (subject.value && !alwaysRequest) return;
|
||||
if (subject.value && !alwaysRequest) return subject;
|
||||
|
||||
if (localRelay) {
|
||||
this.loaders.get(localRelay as AbstractRelay).requestEvents(eventUID);
|
||||
@@ -71,6 +71,11 @@ class EventReactionsService {
|
||||
|
||||
return subject;
|
||||
}
|
||||
|
||||
handleEvent(event: NostrEvent) {
|
||||
// pretend it came from the local relay
|
||||
if (localRelay) this.loaders.get(localRelay as AbstractRelay).handleEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
const eventReactionsService = new EventReactionsService();
|
||||
|
@@ -58,7 +58,7 @@ class EventZapsService {
|
||||
|
||||
requestZaps(eventUID: string, urls: Iterable<string | URL | AbstractRelay>, alwaysRequest = true) {
|
||||
const subject = this.subjects.get(eventUID);
|
||||
if (subject.value && !alwaysRequest) return;
|
||||
if (subject.value && !alwaysRequest) return subject;
|
||||
|
||||
if (localRelay) {
|
||||
this.loaders.get(localRelay as AbstractRelay).requestEvents(eventUID);
|
||||
|
Reference in New Issue
Block a user