support custom recurrence intervals (every N days/weeks, monthly) #2
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
models.Recurrenceand the publisher only supportdailyorweekly(with a fixed weekday). Real chore cadences need more — "every 3 days", "every 2 weeks", "monthly", etc. See the chore brief that prompted this: aiolabs/webapp#57.Server-side scope
This issue tracks the lnbits-side mirror. The client-side (and tag-convention design) lives in aiolabs/webapp#57.
Models
models.Recurrence(currently{frequency: 'daily'|'weekly', day_of_week?, end_date?}) extends to:Keep
daily/weeklyas shorthand aliases — accept both shapes on read so we don't break already-published events.Publisher (
nostr_publisher.build_task_event)Emit the new tags (proposal mirrors webapp#57):
["recurrence", "every-n-days"]+["recurrence-interval", "<n>"]["recurrence", "every-n-weeks"]+["recurrence-interval", "<n>"]+["recurrence-day", "<weekday>"]["recurrence", "monthly"]+["recurrence-day-of-month", "<1..31|last>"]Sync (
nostr_sync._handle_task_event)Parse the new tags into
Recurrence. Today the parser hard-codes("daily", "weekly")and discards anything else.Storage
recurrencecolumn already stores arbitrary JSON, so no migration needed — just the in-memory model widens.Open questions
["rrule", "FREQ=WEEKLY;INTERVAL=2;BYDAY=MO"]) instead of growing our own tag set? Standard, more parsing, deferred to webapp#57's decision.Related