[california/wip/740706-server-invites: 2/2] Don't send email if server handles invites
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california/wip/740706-server-invites: 2/2] Don't send email if server handles invites
- Date: Wed, 26 Nov 2014 00:37:47 +0000 (UTC)
commit d01ff6803327d2504c2509e8056ddf7bb8fc787e
Author: Jim Nelson <jim yorba org>
Date: Tue Nov 25 16:37:09 2014 -0800
Don't send email if server handles invites
src/event-editor/event-editor-main-card.vala | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/event-editor/event-editor-main-card.vala b/src/event-editor/event-editor-main-card.vala
index ff5fcfa..9d91417 100644
--- a/src/event-editor/event-editor-main-card.vala
+++ b/src/event-editor/event-editor-main-card.vala
@@ -376,7 +376,7 @@ public class MainCard : Gtk.Grid, Toolkit.Card {
Toolkit.set_unbusy(this, cursor);
- invite_attendees(target, true);
+ invite_attendees(calendar_model.active, target, true);
if (create_err == null)
notify_success();
@@ -430,7 +430,7 @@ public class MainCard : Gtk.Grid, Toolkit.Card {
Toolkit.set_unbusy(this, cursor);
// PUBLISH is used to update an existing event
- invite_attendees(target, false);
+ invite_attendees(calendar_model.active, target, false);
if (update_err == null)
notify_success();
@@ -438,7 +438,12 @@ public class MainCard : Gtk.Grid, Toolkit.Card {
report_error(_("Unable to update event: %s").printf(update_err.message));
}
- private void invite_attendees(Component.Event event, bool is_create) {
+ private void invite_attendees(Backing.CalendarSource calendar_source, Component.Event event,
+ bool is_create) {
+ // if the server handles this, don't duplicate effort
+ if (calendar_source.server_sends_invites)
+ return;
+
// Make list of invitees, which are attendees who are not organizers
Gee.List<Component.Person> invitees = traverse<Component.Person>(event.attendees)
.filter(attendee => !event.organizers.contains(attendee))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]