From 7e8855d94cb6e73d1b8586a7edb7bf24938818f9 Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Wed, 4 Sep 2024 08:21:38 -0500 Subject: [PATCH] fix #213 --- .changeset/light-eyes-joke.md | 5 +++++ src/classes/batch-relation-loader.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/light-eyes-joke.md diff --git a/.changeset/light-eyes-joke.md b/.changeset/light-eyes-joke.md new file mode 100644 index 000000000..4382163cc --- /dev/null +++ b/.changeset/light-eyes-joke.md @@ -0,0 +1,5 @@ +--- +"nostrudel": patch +--- + +Fixed client sending filters with empty #a tags diff --git a/src/classes/batch-relation-loader.ts b/src/classes/batch-relation-loader.ts index 90cd1052e..d48767ff6 100644 --- a/src/classes/batch-relation-loader.ts +++ b/src/classes/batch-relation-loader.ts @@ -132,7 +132,7 @@ export default class BatchRelationLoader { this.process.active = true; this.subscription.filters = []; if (ids.length > 0) this.subscription.filters.push({ "#e": ids, kinds: this.kinds }); - if (ids.length > 0) this.subscription.filters.push({ "#a": cords, kinds: this.kinds }); + if (cords.length > 0) this.subscription.filters.push({ "#a": cords, kinds: this.kinds }); await this.subscription.update(); } catch (error) {