From cf08b7651564f894a5e58e20f69ce9244075a613 Mon Sep 17 00:00:00 2001 From: Padreug Date: Mon, 27 Apr 2026 00:12:12 +0200 Subject: [PATCH] fix: improve task event filtering in activities feed Filter by both event-type:task tag and presence of status tag (NIP-52 calendar events don't have status on kind 31922, only on RSVP kind 31925). This catches manually-created task events that may not have the event-type tag. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../activities/services/ActivitiesNostrService.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/activities/services/ActivitiesNostrService.ts b/src/modules/activities/services/ActivitiesNostrService.ts index 152d08c..f098728 100644 --- a/src/modules/activities/services/ActivitiesNostrService.ts +++ b/src/modules/activities/services/ActivitiesNostrService.ts @@ -135,9 +135,12 @@ export class ActivitiesNostrService extends BaseService { * Parse a raw Nostr event into an Activity view model. */ private parseNostrEventToActivity(event: NostrEvent): Activity | null { - // Skip task events (they reuse kind 31922 but tag with event-type:task) - const eventType = event.tags?.find(tag => tag[0] === 'event-type')?.[1] - if (eventType === 'task') return null + // Skip task events — they reuse NIP-52 kinds but can be identified by + // task-specific tags (event-type:task, status, recurrence) + const tags = event.tags ?? [] + const eventType = tags.find(tag => tag[0] === 'event-type')?.[1] + const hasStatus = tags.some(tag => tag[0] === 'status') + if (eventType === 'task' || hasStatus) return null if (event.kind === NIP52_KINDS.CALENDAR_TIME_EVENT) { const parsed = parseCalendarTimeEvent(event)