GovTechSG / butler-bot

Telegram bot for booking meeting rooms
MIT License
19 stars 15 forks source link

[Critical] Unable to handle recurring events #8

Closed yuhong90 closed 7 years ago

yuhong90 commented 7 years ago
  1. /booked & /delete command unable to display the latest upcoming booking for recurring bookings. (Recurring bookings are booked directly through google calendar)
  2. unable to detect new bookings' conflicts with recurring bookings.

To handle recurrences and calculate upcoming event in the series, with the start, end and recurrence resp from google.

[ { kind: 'calendar#event',
    etag: '"..."',
    id: '....',
    status: 'confirmed',
    htmlLink: '...',
    created: '2017-02-08T03:13:06.000Z',
    updated: '2017-02-08T06:23:06.853Z',
    summary: 'Meeting by ..',
    location: 'FGD',
    creator: { email: '...' },
    organizer: 
     { email: '...@group.calendar.google.com',
       displayName: 'FGD Calendar',
       self: true },
    start: 
     { dateTime: '2017-02-24T14:00:00+08:00',
       timeZone: 'Asia/Singapore' },
    end: 
     { dateTime: '2017-02-24T15:00:00+08:00',
       timeZone: 'Asia/Singapore' },
    recurrence: [ 'RRULE:FREQ=WEEKLY;UNTIL=20170331T060000Z;BYDAY=FR' ],
    ... } ]