Skip to content

Multi-value property support (ATTENDEE, CATEGORIES) #2

Open

Description

@PhilflowIO

Problem

Properties like ATTENDEE and CATEGORIES can have multiple values, but current implementation only handles single string values.

Example

BEGIN:VEVENT
ATTENDEE;CN=Alice:mailto:[email protected]
ATTENDEE;CN=Bob:mailto:[email protected]
ATTENDEE;CN=Charlie:mailto:[email protected]
CATEGORIES:MEETING,WORK,IMPORTANT
END:VEVENT

Current Behavior

// Only updates the first ATTENDEE
updateFields(event, {
  'ATTENDEE': 'mailto:[email protected]'
});

Desired Behavior

// Support array of values
updateFields(event, {
  'ATTENDEE': [
    'mailto:[email protected]',
    'mailto:[email protected]'
  ],
  'CATEGORIES': ['MEETING', 'WORK']
});

Implementation Considerations

  • Need to detect multi-value properties
  • Handle both single string and array inputs
  • Preserve property parameters (CN, ROLE, etc. for ATTENDEE)
  • Stay true to field-agnostic philosophy

Workaround

Use ical.js directly for multi-value properties:

import ICAL from 'ical.js';

const component = new ICAL.Component(ICAL.parse(event.data));
const vevent = component.getFirstSubcomponent('vevent');

// Add multiple attendees
const attendees = [
  'mailto:[email protected]',
  'mailto:[email protected]'
];

// Remove existing
vevent.removeAllProperties('attendee');

// Add new ones
attendees.forEach(email => {
  vevent.addPropertyWithValue('attendee', email);
});

// Use tsdav-utils for other fields
const updated = updateFields(component.toString(), {
  'SUMMARY': 'Team Meeting'
});

Related

  • RFC 5545 Section 3.8.4.1 (ATTENDEE)
  • RFC 5545 Section 3.8.1.2 (CATEGORIES)

Activity

  1. added
    enhancement
    on Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions