Skip to content

Commit

Permalink
fix: subscribe after sending eose message
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyTseng committed Mar 23, 2024
1 parent 62e2156 commit 3403dc7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/core/src/nostr-relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,6 @@ export class NostrRelay {
return { events };
}

this.subscriptionService.subscribe(ctx, subscriptionId, filters);

(await this.eventService.find(filters)).forEach(event => {
if (this.domain && !EventUtils.checkPermission(event, ctx.pubkey)) {
return;
Expand All @@ -270,6 +268,7 @@ export class NostrRelay {
});

ctx.sendMessage(createOutgoingEoseMessage(subscriptionId));
this.subscriptionService.subscribe(ctx, subscriptionId, filters);

return { events };
}
Expand Down

0 comments on commit 3403dc7

Please sign in to comment.