sabre-io / vobject

:date: The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects
http://sabre.io/vobject/
BSD 3-Clause "New" or "Revised" License
570 stars 126 forks source link

Thunderbird Free Busy not working #701

Open Iharsh-Mishra opened 4 days ago

Iharsh-Mishra commented 4 days ago

So in file lib/FreeBusyGenerator.php there was a code added by @evert on line number 591
Related Commit

  // Only setting FBTYPE if it's not BUSY, because BUSY is the
  // default anyway.
  if ($busyType !== 'BUSY') {
      $prop['FBTYPE'] = $busyType;
  }

This caused freebusy in Thunderbird not working. For status that are BUSY the response doesn't contain FBTYPE which results to No Information status in Thunderbird.

Right now the response that I am getting, which resulted in Thunderbird showing No Information status of FreeBusy, is like:

FREEBUSY;FBTYPE=BUSY-TENTATIVE:20241115T014500Z/20241115T021500Z
FREEBUSY:20241115T021500Z/20241115T051500Z

But Thunderbird wants this, (to show correct BUSY status):

FREEBUSY;FBTYPE=BUSY-TENTATIVE:20241115T014500Z/20241115T021500Z
FREEBUSY;FBTYPE=BUSY:20241115T021500Z/20241115T051500Z

Reverting the code change will make FreeBusy status work in Thunderbird.

 $prop['FBTYPE'] = $busyTime['type'];

My ThunderBird version is 128.4.1 My sabre/dav version is 4.7 My machine is ubuntu 22.04

phil-davis commented 2 days ago

References: The original PR #242

https://datatracker.ietf.org/doc/html/rfc5545#section-3.2.9

https://icalendar.org/iCalendar-RFC-5545/3-2-9-free-busy-time-type.html

RFC5545 says about FBTYPE "If not specified on a property that allows this parameter, the default is BUSY." But then immediately gives an example:

FREEBUSY;FBTYPE=BUSY:19980415T133000Z/19980415T170000Z

That example specifies what is already the default.

In theory, clients should be happy to accept FREEBUSY without FBTYPE specified.

@Iharsh-Mishra @surajdadral did this problem start happening in a recent release of Thunderbird? Or has this been broken in Thunderbird for a long time?

phil-davis commented 2 days ago

@Iharsh-Mishra has this problem/bug been reported to Thunderbird?

If so, please provide a link to the bug report.

If not, then please report it to Thunderbird and link back to here.

Then we can see if Thunderbird is going to adjust its code to conform to the RFC.

Iharsh-Mishra commented 2 days ago

References:

https://bugzilla.mozilla.org/show_bug.cgi?id=1931475

https://github.com/mozilla/releases-comm-central/issues/102

This is working fine in Thunderbird version 60.0

FREEBUSY:20241115T021500Z/20241115T051500Z

For thunderbird versions above 68.0 it is not working.

staabm commented 1 day ago

https://bugzilla-dev.allizom.org/show_bug.cgi?id=1853385

This is a test instance of Bugzilla and not to be used for any production purposes.

Iharsh-Mishra commented 1 day ago

My bad. Now I have updated the link.

https://bugzilla.mozilla.org/show_bug.cgi?id=1931475

evert commented 20 hours ago

I'd also say that if you want this bug to be fixed, it will probably really help them to include more details on what's wrong (FBTYPE=BUSY seems to be required, even though it's the default value) a link to the related standard, maybe include some example data and perhaps even a link back here. Also point out this is a regression.

Because if someone picks up on this ticket this is potentially an easy fix. But if they have to install sabre/dav and reproduce this suddenly could be a bigger task. Also FYI Thunderbird's calendar code is probably mostly Javascript so it may not be that hard to contribute this change either. Just putting it out there!