[evolution/gnome-3-30] Bug 548656 - Emails using cancelled ical event not displayed correctly



commit 8dd908777d0e257af3036a831f88964fe2832298
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]