[evolution-ews] Listen for change notifications only on user folders
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Listen for change notifications only on user folders
- Date: Wed, 7 Oct 2020 09:43:45 +0000 (UTC)
commit 2c10cf22728043b54f1b1d3c3007b09ca2ca5421
Author: Milan Crha <mcrha redhat com>
Date: Wed Oct 7 11:41:00 2020 +0200
Listen for change notifications only on user folders
The foreign and public folders cannot be used for change notifications,
due to the server returning and error "A subscription can only be established
on a single public folder or on folders from a single mailbox.", thus, rather
than not having any change notifications, do listen on user folders only.
The mail part did that already, only address book and calendar parts
did not do it.
src/EWS/addressbook/e-book-backend-ews.c | 4 +++-
src/EWS/calendar/e-cal-backend-ews.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/EWS/addressbook/e-book-backend-ews.c b/src/EWS/addressbook/e-book-backend-ews.c
index 1f9f2fb0..197d49fd 100644
--- a/src/EWS/addressbook/e-book-backend-ews.c
+++ b/src/EWS/addressbook/e-book-backend-ews.c
@@ -3309,7 +3309,9 @@ ebb_ews_connect_sync (EBookMetaBackend *meta_backend,
if (!bbews->priv->is_gal &&
camel_ews_settings_get_listen_notifications (ews_settings) &&
- e_ews_connection_satisfies_server_version (bbews->priv->cnc, E_EWS_EXCHANGE_2010_SP1)) {
+ e_ews_connection_satisfies_server_version (bbews->priv->cnc, E_EWS_EXCHANGE_2010_SP1) &&
+ !e_source_ews_folder_get_foreign (ews_folder) &&
+ !e_source_ews_folder_get_public (ews_folder)) {
GSList *folders = NULL;
folders = g_slist_prepend (folders, bbews->priv->folder_id);
diff --git a/src/EWS/calendar/e-cal-backend-ews.c b/src/EWS/calendar/e-cal-backend-ews.c
index 6007e730..acb6cd15 100644
--- a/src/EWS/calendar/e-cal-backend-ews.c
+++ b/src/EWS/calendar/e-cal-backend-ews.c
@@ -1732,7 +1732,9 @@ ecb_ews_connect_sync (ECalMetaBackend *meta_backend,
if (!cbews->priv->is_freebusy_calendar &&
camel_ews_settings_get_listen_notifications (ews_settings) &&
- e_ews_connection_satisfies_server_version (cbews->priv->cnc, E_EWS_EXCHANGE_2010_SP1)) {
+ e_ews_connection_satisfies_server_version (cbews->priv->cnc, E_EWS_EXCHANGE_2010_SP1) &&
+ !e_source_ews_folder_get_foreign (ews_folder) &&
+ !e_source_ews_folder_get_public (ews_folder)) {
GSList *folders = NULL;
folders = g_slist_prepend (folders, cbews->priv->folder_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]