[evolution-ews] Bug #702922 - Meetings with no attendees are treated as Appointment



commit fd0ea6b97d3bb50aece56da6a37f233f674a2a79
Author: Fabiano Fidêncio <fidencio redhat com>
Date:   Mon Jun 24 03:09:53 2013 +0200

    Bug #702922 - Meetings with no attendees are treated as Appointment
    
    A meeting with no attendees is treated as an appointment by EWS.
    To workaround this problem we need to add the "Organizator" as an
    attendee, if we don't have any other. And we never should remove him
    from attendee's list, once he is only added when is really necessary.

 src/calendar/e-cal-backend-ews-utils.c |    3 +++
 src/calendar/e-cal-backend-ews.c       |    6 ------
 2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews-utils.c b/src/calendar/e-cal-backend-ews-utils.c
index ab3304a..32c6611 100644
--- a/src/calendar/e-cal-backend-ews-utils.c
+++ b/src/calendar/e-cal-backend-ews-utils.c
@@ -95,6 +95,9 @@ e_ews_collect_attendees (icalcomponent *comp,
                        break;
                }
        }
+
+       if (*required == NULL && *optional == NULL && *resource == NULL && org_email_address != NULL)
+               *required = g_slist_prepend (*required, (gpointer) org_email_address);
 }
 
 gint
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index d2c78dc..61935da 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -3354,7 +3354,6 @@ add_item_to_cache (ECalBackendEws *cbews,
                const EwsId *item_id;
                ECalComponentId *id;
                const GSList *l = NULL;
-               const gchar *org_email_address = e_ews_collect_organizer (icalcomp);
                const gchar *uid = e_ews_item_get_uid (item);
 
                item_id = e_ews_item_get_id (item);
@@ -3372,11 +3371,6 @@ add_item_to_cache (ECalBackendEws *cbews,
                        if (g_strcmp0 (attendee->mailbox->routing_type, "EX") == 0)
                                email = e_ews_item_util_strip_ex_address (attendee->mailbox->email);
 
-                       /*remove organizer for attendees list*/
-                       if (g_ascii_strcasecmp (org_email_address, email ? email : attendee->mailbox->email) 
== 0) {
-                               continue;
-                       }
-
                        mailtoname = g_strdup_printf ("mailto:%s";, email ? email : attendee->mailbox->email);
                        icalprop = icalproperty_new_attendee (mailtoname);
                        g_free (mailtoname);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]