Fix bug 815151 - Invitation replies are not shown (REPLY method, sender is null) (regression). r=mmecca

--HG--
extra : rebase_source : 940388e702014ac7863309f09c2d867ee070545c
This commit is contained in:
Philipp Kewisch 2012-11-26 16:44:22 +01:00
Родитель d9dacd78ef
Коммит e98aeb9e1d
1 изменённых файлов: 17 добавлений и 8 удалений

Просмотреть файл

@ -94,15 +94,24 @@ ltnMimeConverter.prototype = {
"lightning");
break;
case "REPLY": {
// Generate proper body from my participation status
let sender = cal.getInvitedAttendee(item);
let statusString = (sender.participationStatus == "DECLINED" ?
"itipReplyBodyDecline": "itipReplyBodyAccept");
// This is a reply received from someone else, there should
// be just one attendee, the attendee that replied. If
// there is more than one attendee, just take the first so
// code doesn't break here.
let attendees = item.getAttendees({});
if (attendees && attendees.length >= 1) {
let sender = attendees[0];
let statusString = (sender.participationStatus == "DECLINED" ?
"itipReplyBodyDecline" :
"itipReplyBodyAccept");
header = cal.calGetString("lightning",
statusString,
[sender],
"lightning");
header = cal.calGetString("lightning",
statusString,
[sender.toString()],
"lightning");
} else {
header = "";
}
break;
}
}