[evolution-ews/gnome-3-28] Bug 796297 - Make it possible to not request RSVP (all-or-nothing) ][
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/gnome-3-28] Bug 796297 - Make it possible to not request RSVP (all-or-nothing) ][
- Date: Mon, 25 Jun 2018 09:40:19 +0000 (UTC)
commit 5470702c8cdf68952b25637403fae1b815d21f48
Author: Milan Crha <mcrha redhat com>
Date: Mon Jun 25 11:41:04 2018 +0200
Bug 796297 - Make it possible to not request RSVP (all-or-nothing) ][
src/calendar/e-cal-backend-ews-utils.c | 2 +-
src/calendar/e-cal-backend-ews.c | 7 +++++++
src/server/e-ews-item.c | 14 ++++++++++++++
src/server/e-ews-item.h | 2 ++
4 files changed, 24 insertions(+), 1 deletion(-)
---
diff --git a/src/calendar/e-cal-backend-ews-utils.c b/src/calendar/e-cal-backend-ews-utils.c
index 15c2cb74..34eee8d3 100644
--- a/src/calendar/e-cal-backend-ews-utils.c
+++ b/src/calendar/e-cal-backend-ews-utils.c
@@ -1600,7 +1600,7 @@ convert_vevent_component_to_updatexml (ESoapMessage *msg,
e_ews_collect_attendees (icalcomp, &required, &optional, &resource, &rsvp_requested);
- e_ews_message_write_string_parameter (msg, "IsResponseRequested", NULL, rsvp_requested ? "true" :
"false");
+ convert_vevent_property_to_updatexml (msg, "IsResponseRequested", rsvp_requested ? "true" : "false",
"calendar", NULL, NULL);
if (required != NULL) {
e_ews_message_start_set_item_field (msg, "RequiredAttendees", "calendar", "CalendarItem");
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 19e26fc1..184b50fc 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -87,6 +87,7 @@ struct _ECalBackendEwsPrivate {
" calendar:Resources" \
" calendar:ModifiedOccurrences" \
" calendar:IsMeeting" \
+ " calendar:IsResponseRequested" \
" calendar:MyResponseType" \
" calendar:RequiredAttendees" \
" calendar:OptionalAttendees"
@@ -679,6 +680,7 @@ ecb_ews_item_to_component_sync (ECalBackendEws *cbews,
item_id = e_ews_item_get_id (item);
if (e_ews_item_get_is_meeting (item)) {
+ gboolean is_response_requested = e_ews_item_get_is_response_requested (item);
gchar *user_email;
user_email = camel_ews_settings_dup_email (ews_settings);
@@ -718,6 +720,11 @@ ecb_ews_item_to_component_sync (ECalBackendEws *cbews,
icalproperty_add_parameter (icalprop, cu_type);
icalproperty_add_parameter (icalprop, param);
+ if (is_response_requested) {
+ param = icalparameter_new_rsvp (ICAL_RSVP_TRUE);
+ icalproperty_add_parameter (icalprop, param);
+ }
+
if (user_email && (email || attendee->mailbox->email) &&
e_ews_item_get_my_response_type (item) &&
g_ascii_strcasecmp (email ? email : attendee->mailbox->email, user_email)
== 0) {
param = ecb_ews_responsetype_to_partstat
(e_ews_item_get_my_response_type (item));
diff --git a/src/server/e-ews-item.c b/src/server/e-ews-item.c
index c912d02e..c28cca5d 100644
--- a/src/server/e-ews-item.c
+++ b/src/server/e-ews-item.c
@@ -139,6 +139,7 @@ struct _EEwsItemPrivate {
EwsMailbox *sender;
gboolean is_meeting;
+ gboolean is_response_requested;
GSList *modified_occurrences;
GSList *attachments_ids;
gchar *my_response_type;
@@ -282,6 +283,7 @@ e_ews_item_init (EEwsItem *item)
item->priv->item_type = E_EWS_ITEM_TYPE_UNKNOWN;
item->priv->is_meeting = FALSE;
+ item->priv->is_response_requested = FALSE;
item->priv->mapi_extended_tags = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free);
item->priv->mapi_extended_sets = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
(GDestroyNotify) g_hash_table_destroy);
@@ -1145,6 +1147,10 @@ e_ews_item_set_from_soap_parameter (EEwsItem *item,
value = e_soap_parameter_get_string_value (subparam);
priv->is_meeting = (!g_ascii_strcasecmp (value, "true"));
g_free (value);
+ } else if (!g_ascii_strcasecmp (name, "IsResponseRequested")) {
+ value = e_soap_parameter_get_string_value (subparam);
+ priv->is_response_requested = (!g_ascii_strcasecmp (value, "true"));
+ g_free (value);
} else if (!g_ascii_strcasecmp (name, "MyResponseType")) {
g_free (priv->my_response_type);
priv->my_response_type = e_soap_parameter_get_string_value (subparam);
@@ -1410,6 +1416,14 @@ e_ews_item_get_is_meeting (EEwsItem *item)
return item->priv->is_meeting;
}
+gboolean
+e_ews_item_get_is_response_requested (EEwsItem *item)
+{
+ g_return_val_if_fail (E_IS_EWS_ITEM (item), FALSE);
+
+ return item->priv->is_response_requested;
+}
+
gboolean
e_ews_item_is_forwarded (EEwsItem *item,
gboolean *forwarded)
diff --git a/src/server/e-ews-item.h b/src/server/e-ews-item.h
index cd67f8c1..5562b6e7 100644
--- a/src/server/e-ews-item.h
+++ b/src/server/e-ews-item.h
@@ -218,6 +218,8 @@ EwsMailbox *
void e_ews_mailbox_free (EwsMailbox *mailbox);
gboolean e_ews_item_get_is_meeting (EEwsItem *item);
+gboolean e_ews_item_get_is_response_requested
+ (EEwsItem *item);
const GSList * e_ews_item_get_modified_occurrences
(EEwsItem *item);
gchar * e_ews_embed_attachment_id_in_uri (const gchar *olduri, const gchar *attach_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]