Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type issue for organizer attribute #224

Open
derhyl opened this issue Oct 21, 2022 · 2 comments
Open

Type issue for organizer attribute #224

derhyl opened this issue Oct 21, 2022 · 2 comments

Comments

@derhyl
Copy link

derhyl commented Oct 21, 2022

Hi,

It seems that you have a ts type issue on organizer Field.

This is your type definition
export type Person = { name?: string; email?: string; dir?: string; };

This is the standard :
https://www.kanzaki.com/docs/ical/calAddress.html

It seems that email address is actually required.

In consequence, the ics generates but is not importable on google cal or outlook because it's considered corrupted.

Can you please update your type definitions?

Thanks

@nurjinjafar
Copy link

nurjinjafar commented Jan 3, 2023

Hi,

the same issue appeared as well on the attendees field for the mentioned calendars (Google Calendar, Outlook).
However, the ics file can be imported into apple Calendar. but, it shows ERROR where the attendees list should be shown, because of a missing email field!

image-20221219-101305 (1)

are there any updates regarding this issue?
Thanks!

@Vincent-Maret
Copy link

Vincent-Maret commented Mar 29, 2024

Waiting for a fix, here is our workaround :

// Here is the specification for ics organizer : https://www.rfc-editor.org/rfc/rfc5545#section-3.8.4.3:~:text=the%20following%0A%20%20%20%20%20%20notation%3A-,organizer,-%3D%20%22ORGANIZER%22%20orgparam%20%22%3A%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20cal
// ICS generated by ics package is not compliant with the RFC5545 as spotted in the issue : https://github.com/adamgibbons/ics/issues/224
// even without this mailto option, the delimiter ':' should be set
export function fixIcsOrganizer(icsString: string): string {
  return icsString.replace(/ORGANIZER;CN=(.*?[^:])\r\n/, (_, organizerName) => {
    return `ORGANIZER;CN=${organizerName}:\r\n`
  })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants