$Log$
+ Revision 601.91 2002/12/18 04:08:16 ajc
+ * Don't attempt to send out invitations when there are no attendees.
+
Revision 601.90 2002/12/15 10:53:51 error
* Final touches on the new message formatter.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
/*
* ical_send_out_invitations() is called by ical_saving_vevent() when it
- * finds a VEVENT. FIXME ... finish implementing.
+ * finds a VEVENT.
*/
void ical_send_out_invitations(icalcomponent *cal) {
icalcomponent *the_request = NULL;
struct CtdlMessage *msg = NULL;
struct recptypes *valid = NULL;
char attendees_string[SIZ];
+ int num_attendees = 0;
char this_attendee[SIZ];
icalproperty *attendee = NULL;
char summary_string[SIZ];
"%s, ",
this_attendee
);
+ ++num_attendees;
}
}
}
- lprintf(9, "attendees_string: <%s>\n", attendees_string);
+ lprintf(9, "<%d> attendees: <%s>\n", num_attendees, attendees_string);
+
+ /* If there are no attendees, there are no invitations to send, so...
+ * don't bother putting one together! Punch out, Maverick!
+ */
+ if (num_attendees == 0) {
+ icalcomponent_free(the_request);
+ return;
+ }
/* Encapsulate the VEVENT component into a complete VCALENDAR */
encaps = icalcomponent_new(ICAL_VCALENDAR_COMPONENT);