Disambiguate task vs activity NIP-52 calendar events on shared relays #25
Labels
No labels
app:activities
app:chat
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The tasks module and activities module both use NIP-52 calendar event kinds (31922/31923) on the same Nostr relay. This causes task events ("Put out the recycling", "Put the chickens to bed") to appear in the activities feed as community events.
Currently we filter by checking for
event-type: tasktag or astatustag on kind 31922 events (NIP-52 only definesstatuson RSVP kind 31925, not on calendar events). This works as a stopgap but is fragile — manually created events may not have these tags, and future modules could introduce other non-activity calendar events.The core challenge
NIP-52 calendar events are a general-purpose format. There's no built-in mechanism to distinguish "this is a community activity" from "this is a household task" from "this is a meeting." Both are valid kind 31922 events per spec.
Possible solutions
1. Custom
event-typetag convention['event-type', 'task'], activities with['event-type', 'activity']event-type: activity(whitelist, not blacklist)2. Use
t(hashtag) tags as categories['t', 'task']or['t', 'chore']['t', 'event']or domain-specific tags like['t', 'concert']#tfilter excluding task-related hashtags3. Separate relay channels
4. Use different Nostr kinds for tasks
5. Author-based filtering
Current workaround
ActivitiesNostrService.parseNostrEventToActivity()filters out events withevent-type: tasktag or astatustag on kind 31922 (since NIP-52 doesn't define status on calendar events, only on RSVPs).References
src/modules/tasks/services/TaskService.tssrc/modules/activities/services/ActivitiesNostrService.ts:137-143