[evolution] Bug 548656 - Emails using cancelled ical event not displayed correctly



commit 3cd558764c159f4fe6457d733052acbbfcc21176
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 17 11:54:37 2018 +0200

    Bug 548656 - Emails using cancelled ical event not displayed correctly
    
    Closes https://bugzilla.gnome.org/show_bug.cgi?id=548656

 src/modules/itip-formatter/itip-view.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
---
diff --git a/src/modules/itip-formatter/itip-view.c b/src/modules/itip-formatter/itip-view.c
index 8d9434f3aa..72edf0e335 100644
--- a/src/modules/itip-formatter/itip-view.c
+++ b/src/modules/itip-formatter/itip-view.c
@@ -5645,7 +5645,27 @@ extract_itip_data (ItipView *view,
 
        prop = icalcomponent_get_first_property (view->priv->main_comp, ICAL_METHOD_PROPERTY);
        if (prop == NULL) {
+               icalcomponent *subcomp;
+
                view->priv->method = ICAL_METHOD_PUBLISH;
+
+               /* Search in sub-components for the METHOD property when not found in the VCALENDAR */
+               for (subcomp = icalcomponent_get_first_component (view->priv->main_comp, ICAL_ANY_COMPONENT);
+                    subcomp;
+                    subcomp = icalcomponent_get_next_component (view->priv->main_comp, ICAL_ANY_COMPONENT)) {
+                       kind = icalcomponent_isa (subcomp);
+
+                       if (kind == ICAL_VEVENT_COMPONENT ||
+                           kind == ICAL_VTODO_COMPONENT ||
+                           kind == ICAL_VJOURNAL_COMPONENT ||
+                           kind == ICAL_VFREEBUSY_COMPONENT) {
+                               prop = icalcomponent_get_first_property (subcomp, ICAL_METHOD_PROPERTY);
+                               if (prop) {
+                                       view->priv->method = icalproperty_get_method (prop);
+                                       break;
+                               }
+                       }
+               }
        } else {
                view->priv->method = icalproperty_get_method (prop);
        }


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