[evolution-ews] I#189 - Specify FolderClass when creating generic folder only



commit ce3f6ae20d197589e9cba9eb70c1c16d7d3c38e5
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 21 17:24:25 2022 +0200

    I#189 - Specify FolderClass when creating generic folder only
    
    Closes https://gitlab.gnome.org/GNOME/evolution-ews/-/issues/189

 src/EWS/common/e-ews-connection.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/EWS/common/e-ews-connection.c b/src/EWS/common/e-ews-connection.c
index f7c26435..144d2a74 100644
--- a/src/EWS/common/e-ews-connection.c
+++ b/src/EWS/common/e-ews-connection.c
@@ -7100,7 +7100,7 @@ e_ews_connection_create_folder (EEwsConnection *cnc,
        GSimpleAsyncResult *simple;
        EwsAsyncData *async_data;
        const gchar *folder_element;
-       const gchar *folder_class;
+       const gchar *folder_class = NULL;
 
        g_return_if_fail (cnc != NULL);
 
@@ -7146,19 +7146,15 @@ e_ews_connection_create_folder (EEwsConnection *cnc,
                        break;
                case E_EWS_FOLDER_TYPE_CALENDAR:
                        folder_element = "CalendarFolder";
-                       folder_class = "IPF.Appointment";
                        break;
                case E_EWS_FOLDER_TYPE_CONTACTS:
                        folder_element = "ContactsFolder";
-                       folder_class = "IPF.Contact";
                        break;
                case E_EWS_FOLDER_TYPE_SEARCH:
                        folder_element = "SearchFolder";
-                       folder_class = "IPF.Note";
                        break;
                case E_EWS_FOLDER_TYPE_TASKS:
                        folder_element = "TasksFolder";
-                       folder_class = "IPF.Task";
                        break;
                case E_EWS_FOLDER_TYPE_MEMOS:
                        folder_element = "Folder";
@@ -7168,7 +7164,8 @@ e_ews_connection_create_folder (EEwsConnection *cnc,
 
        e_soap_message_start_element (msg, "Folders", "messages", NULL);
        e_soap_message_start_element (msg, folder_element, NULL, NULL);
-       e_ews_message_write_string_parameter (msg, "FolderClass", NULL, folder_class);
+       if (folder_class)
+               e_ews_message_write_string_parameter (msg, "FolderClass", NULL, folder_class);
        e_ews_message_write_string_parameter (msg, "DisplayName", NULL, folder_name);
 
        e_soap_message_end_element (msg);


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