Skip to content

friends: accept the new meeting repeat options from the backend #246

Closed

Description

@jaspermayone

WITCodingClub/calendar-backend#870 adds more repeat options for friend meetings (the backend side of #227). The API can now return meetings that the extension does not accept.

The problem

meeting() in src/lib/friends/savedMeetings.ts accepts only one_time and weekly:

['one_time', 'weekly'].includes(String(value.frequency))

savedMeetings() uses value.meetings.every(meeting). One daily or monthly meeting makes the extension reject the whole list from GET /api/friends/meetings, and every meeting disappears. A user who is only invited to such a meeting sees the same problem. savedMeetingResponse also throws for a create or PATCH answer with a new frequency.

The friend_meeting_events flag is off, so nobody sees this yet. Old extension versions stay installed after a release. Release this fix before the flag turns on for real users.

What changes in the API

  • frequency: one_time, daily, weekly, monthly.
  • New fields on the meeting object: repeat_interval (integer, 1 to 30) and repeat_days (weekday names for a weekly meeting, start day included; empty for other frequencies).
  • repeat_until can be a date that the person picked. It is not always the end of the term.
  • PATCH takes the same repeat fields. See docs/friend-meetings.md in the backend.

To do

  • Accept daily and monthly in meeting(), and read repeat_interval and repeat_days.
  • Skip a meeting with a frequency the extension does not know, and do not reject the whole list. Then a later backend change does not cause the same break.
  • Fix savedMeetingOverlaps. It assumes a weekly meeting on one weekday with an interval of 1. Example: start Wed 2026-10-28, repeat_days Wed and Fri, repeat_until Fri 2026-12-18. It finds the last date as Wed Dec 16, so a week view that starts Dec 17 drops the meeting. The real last occurrence is Dec 18. Use the occurrences from GET /api/friends/meetings, or the recurrence RRULE, and not a date calculation.
  • The repeat options UI from friends: add more options for repeat event when creating a meeting from a suggested time #227.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions