Support for mixed server/non-server attendees

RESOLVED FIXED in 0.9

Status

Calendar
Provider: CalDAV
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: dbo, Assigned: dbo)

Tracking

unspecified
Bug Flags:
blocking-calendar0.9 +

Details

Attachments

(2 attachments)

(Assignee)

Description

10 years ago
follow up on bug 409921:

In case the CUA specified a mix of server-users and non-server users as attendees, we want to use caldav (outbox) scheduling for all server attendees and fall back to iMIP for all non-server attendees.

Comment 1

10 years ago
I have a draft patch for this, so I'll take it.
Assignee: nobody → browning
(Assignee)

Updated

10 years ago
Blocks: 451039
(Assignee)

Updated

10 years ago
Flags: blocking-calendar0.9+

Comment 2

10 years ago
Created attachment 334404 [details] [diff] [review]
fall back to email

this adds the fall-back-to-email bit, fixes some freebusy bustage, and removes some unneeded code
Attachment #334404 - Flags: review?(daniel.boelzle)
(Assignee)

Comment 3

10 years ago
Comment on attachment 334404 [details] [diff] [review]
fall back to email

>+                        var failedDeliveries = [];
>+                        for (var i = 0; i < responseXML.*.length(); i++) {
>+                            var response = new XML(responseXML.*[i]);
>+
>+                            var recip = response..C::recipient..D::href;
>+                            var status = response..C::["request-status"];
>+                            if (status.substr(0,1) != "2") {
>+                                failedDeliveries.push(recip);
>+                                if (thisCalendar.verboseLogging()) {
>+                                    LOG("CalDAV: failed delivery to " + recip);
>+                                }
>+                            }
>+                        }
>+
>+                        var remainingAttendees = [];
>+                        var j = 0;
>+                        while (failedDeliveries[j]) {
>+                            var k = 0;
>+                            while (aRecipients[k]) {
>+                                if (failedDeliveries[j].toLowerCase() ==
>+                                    aRecipients[k].id.toLowerCase()) {
>+                                    remainingAttendees.push(aRecipients[k]);
>+                                    break;
>+                                }
>+                                k++;
>+                            }
>+                            j++;
>+                        }
>+

I think we could resolve the second loop easily, integrating it into the above one.


>+                        if (remainingAttendees.length) {
>+                            if (thisCalendar.verboseLogging()) {
>+                                LOG("CalDAV: sending email to " +
>+                                    remainingAttendees.length + " recipients");
>+                            }
>+                            var imipTransport = Components.classes["@mozilla.org/calendar/itip-transport;1?type=email"]
>+                                                          .getService(Components.interfaces.calIItipTransport);

A check against a configured email identity is missing, and I think we should consolidate that code into calProviderUtils.js.

>+                            var subjectStringId = "";
>+                            var bodyStringId = "";
>+                            switch (aItipItem.responseMethod) {
>+                                case 'REQUEST':
>+                                    subjectStringId = "itipRequestSubject";
>+                                    bodyStringId = "itipRequestBody";
>+                                    break;
>+                                case 'CANCEL':
>+                                    subjectStringId = "itipCancelSubject";
>+                                    bodyStringId = "itipCancelBody";
>+                                    break;
>+                            }
>+                            var summary = (item.getProperty("SUMMARY") || "");
>+                            var subject = calGetString("lightning",
>+                                                   subjectStringId,
>+                                                   [summary],
>+                                                   "lightning");
>+                            var body = calGetString("lightning",
>+                                                bodyStringId,
>+                                                [item.organizer ? item.organizer.toString() : "", summary],
>+                                                "lightning");

To not copy this code where needed, IMO we should put it into calItipTransport, removing body and subject parameter, which are transport-specific. Moreover, I think we could resolve simpleSendResponse into sendItems as well, since it's little more code.

>+                            imipTransport.sendItems(remainingAttendees.length,
>+                                                remainingAttendees,
>+                                                subject,
>+                                                body,
>+                                                aItipItem);
>+                        }
>+                    }
>                 }

r- for now
Attachment #334404 - Flags: review?(daniel.boelzle) → review-
(Assignee)

Comment 4

10 years ago
Created attachment 334469 [details] [diff] [review]
fall back to email - v2, + changing iTIP transport
Assignee: browning → daniel.boelzle
Status: NEW → ASSIGNED
Attachment #334469 - Flags: review?(philipp)
Comment on attachment 334469 [details] [diff] [review]
fall back to email - v2, + changing iTIP transport 

>             // XXX discuss: does it make sense to check targetCalendar.canNotify(respMethod, ...) here?
>             //              _isExistingItem will store the item
btw, I do think it makes sense to call that here.

>+        LOG(STACK(20));
Remove

r=philipp
Attachment #334469 - Flags: review?(philipp) → review+
(Assignee)

Comment 6

10 years ago
Checked in on HEAD and MOZILLA_1_8_BRANCH => FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.9
You need to log in before you can comment on or make changes to this bug.