Last Comment Bug 1158036 - Support sendMailTo for URN type attendees
: Support sendMailTo for URN type attendees
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Dialogs (show other bugs)
: Trunk
: Unspecified Unspecified
-- normal (vote)
: 4.2
Assigned To: [:MakeMyDay]
:
:
Mentors:
Depends on: 1156015 1228438
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-24 01:09 PDT by [:MakeMyDay]
Modified: 2015-11-26 13:54 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
FollowUpUrnEmailSupport-v1.diff (9.02 KB, patch)
2015-04-24 01:15 PDT, [:MakeMyDay]
philipp: review+
Details | Diff | Splinter Review
FollowUpUrnEmailSupport-v2.diff (8.98 KB, patch)
2015-05-10 04:28 PDT, [:MakeMyDay]
makemyday: review+
Details | Diff | Splinter Review

Description User image [:MakeMyDay] 2015-04-24 01:09:19 PDT
Add support for sending e-mail to attendees/organizer with URN-type id at for all occurences of sendMailTo(). Follow up to bug 1156015.
Comment 1 User image [:MakeMyDay] 2015-04-24 01:15:37 PDT
Created attachment 8597106 [details] [diff] [review]
FollowUpUrnEmailSupport-v1.diff

Patch needs to be applied on top of fix for bug 1156015.
Comment 2 User image Philipp Kewisch [:Fallen] 2015-04-27 03:49:06 PDT
Comment on attachment 8597106 [details] [diff] [review]
FollowUpUrnEmailSupport-v1.diff

Review of attachment 8597106 [details] [diff] [review]:
-----------------------------------------------------------------

::: calendar/base/content/calendar-task-view.js
@@ +214,5 @@
>      var item = document.getElementById("calendar-task-tree").currentTask;
>      if (item != null) {
> +        let organizer = item.organizer;
> +        let email = cal.getAttendeeEmail(organizer, true);
> +        let emailSubject = calGetString("calendar-event-dialog", "emailSubjectReply", [item.title]);

cal.calGetString()

::: calendar/base/content/dialogs/calendar-event-dialog.js
@@ +3666,5 @@
>   */
>  function sendMailToAttendees(aAttendees) {
> +    let toList = cal.getRecipientList(aAttendees);
> +    let item = saveItem();
> +    let emailSubject = calGetString("calendar-event-dialog", "emailSubjectReply", [item.title]);

cal.calGetString()

::: calendar/base/content/dialogs/calendar-summary-dialog.js
@@ +362,5 @@
> +    let args = window.arguments[0];
> +    let item = args.calendarEvent;
> +    let organizer = item.organizer;
> +    let email = cal.getAttendeeEmail(organizer, true);
> +    let emailSubject = calGetString("calendar-event-dialog", "emailSubjectReply", [item.title]);

cal.calGetString()

::: calendar/base/modules/calUtils.jsm
@@ +341,5 @@
>      /**
> +     * Provides a string to use in email "to" header for given attendees
> +     *
> +     * @param  array   Array of calIAttendee's
> +     * @return string  Valid string to use in to header

@param {Array[calIAttendee]} aAttendee    Attendees the emails should be addressed to
@return {String}                          Valid To-header string of attendees.

Or drop the types and just describe it as you have.

@@ +355,5 @@
> +            if (rEmail.length && toList.length > 0) {
> +                toList += ", ";
> +            }
> +            // Add this recipient id to the list.
> +            toList += rEmail;

Same comment as in the other review about map/filter/reduce.
Comment 3 User image [:MakeMyDay] 2015-05-10 04:28:16 PDT
Created attachment 8603817 [details] [diff] [review]
FollowUpUrnEmailSupport-v2.diff

Updated patch with comments considered. Needs to be applied on to of the patch for bug 1156015.

Note You need to log in before you can comment on or make changes to this bug.