fix: filter out task events from activities feed
Tasks reuse NIP-52 kind 31922 but tag events with event-type:task. Filter these out in parseNostrEventToActivity so household chores don't show up as community activities. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
357ec3f3e1
commit
680b1a97e6
1 changed files with 4 additions and 0 deletions
|
|
@ -135,6 +135,10 @@ export class ActivitiesNostrService extends BaseService {
|
||||||
* Parse a raw Nostr event into an Activity view model.
|
* Parse a raw Nostr event into an Activity view model.
|
||||||
*/
|
*/
|
||||||
private parseNostrEventToActivity(event: NostrEvent): Activity | null {
|
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
|
||||||
|
|
||||||
if (event.kind === NIP52_KINDS.CALENDAR_TIME_EVENT) {
|
if (event.kind === NIP52_KINDS.CALENDAR_TIME_EVENT) {
|
||||||
const parsed = parseCalendarTimeEvent(event)
|
const parsed = parseCalendarTimeEvent(event)
|
||||||
if (parsed) return calendarTimeEventToActivity(parsed)
|
if (parsed) return calendarTimeEventToActivity(parsed)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue