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