我正在尝试在组织者日历中添加活动,但组织者日历未更新。
// add guest user in attendee
meetingGuestUserList.forEach(meetingGuestUser -> {
Attendee attendee =
new Attendee(URI.create("mailto:" + meetingGuestUser.getGuestUser().getEmail()));
attendee.getParameters().add(Role.REQ_PARTICIPANT);
attendee.getParameters().add(Rsvp.TRUE);
attendee.getParameters().add(PartStat.NEEDS_ACTION);
attendee.getParameters().add(new Cn(meetingGuestUser.getGuestUser().getEmail()));
attendee.getParameters().add(CuType.INDIVIDUAL);
vEvent.getProperties().add(attendee);
});
Attendee organizer = new Attendee(URI.create("mailto:" + organizerEmail));
organizer.getParameters().add(Role.REQ_PARTICIPANT);
organizer.getParameters().add(Rsvp.TRUE);
organizer.getParameters().add(PartStat.ACCEPTED);
organizer.getParameters().add(CuType.INDIVIDUAL);
organizer.getParameters().add(new Cn(organizerEmail));
vEvent.getProperties().add(organizer);
Organizer orger = new Organizer(URI.create("mailto:" + organizerEmail));
orger.getParameters().add(new Cn(organizerEmail));
vEvent.getProperties().add(orger);
所有参与者的日历都会更新,其中包括组织者。