Use kind 1111 comments with address-first tags

This commit is contained in:
thePR0M3TH3AN committed 2025-10-29 07:45:34 -04:00
1 parent a42dbb45e2
commit d1d4fa150c
5 files changed
+128 -68

No files matched your search

+3 -2
View File
@@ -1,5 +1,6 @@
import { devLogger } from "../utils/logger.js";
import { buildVideoAddressPointer } from "../utils/videoPointer.js";
import { COMMENT_EVENT_KIND } from "../nostr/commentEvents.js";
const DEFAULT_MAX_DISCUSSION_COUNT_VIDEOS = 24;
const COUNT_UNSUPPORTED_TITLE = "Relay does not support NIP-45 COUNT queries.";
@@ -130,12 +131,12 @@ export default class DiscussionCountService {
const filters = [];
const eventId = typeof video.id === "string" ? video.id.trim() : "";
if (eventId) {
filters.push({ kinds: [1], "#e": [eventId] });
filters.push({ kinds: [COMMENT_EVENT_KIND], "#e": [eventId] });
}
const address = buildVideoAddressPointer(video);
if (address) {
filters.push({ kinds: [1], "#a": [address] });
filters.push({ kinds: [COMMENT_EVENT_KIND], "#a": [address] });
}
return filters;