|
|
@ -158,9 +158,8 @@ import javax.mail.internet.ParseException;
|
|
|
|
import biweekly.Biweekly;
|
|
|
|
import biweekly.Biweekly;
|
|
|
|
import biweekly.ICalendar;
|
|
|
|
import biweekly.ICalendar;
|
|
|
|
import biweekly.component.VEvent;
|
|
|
|
import biweekly.component.VEvent;
|
|
|
|
import biweekly.parameter.ParticipationStatus;
|
|
|
|
|
|
|
|
import biweekly.property.Attendee;
|
|
|
|
|
|
|
|
import biweekly.property.Method;
|
|
|
|
import biweekly.property.Method;
|
|
|
|
|
|
|
|
import biweekly.property.Status;
|
|
|
|
import ezvcard.VCard;
|
|
|
|
import ezvcard.VCard;
|
|
|
|
import ezvcard.VCardVersion;
|
|
|
|
import ezvcard.VCardVersion;
|
|
|
|
import ezvcard.io.text.VCardWriter;
|
|
|
|
import ezvcard.io.text.VCardWriter;
|
|
|
@ -4454,27 +4453,12 @@ public class MessageHelper {
|
|
|
|
else if (method == null || method.isRequest() || method.isReply()) {
|
|
|
|
else if (method == null || method.isRequest() || method.isReply()) {
|
|
|
|
int status = CalendarContract.Events.STATUS_TENTATIVE;
|
|
|
|
int status = CalendarContract.Events.STATUS_TENTATIVE;
|
|
|
|
if (method != null && method.isReply()) {
|
|
|
|
if (method != null && method.isReply()) {
|
|
|
|
List<Attendee> attendees = event.getAttendees();
|
|
|
|
Status istatus = event.getStatus();
|
|
|
|
if (attendees != null && message.to != null)
|
|
|
|
if (istatus != null)
|
|
|
|
for (Attendee attendee : attendees) {
|
|
|
|
if (Status.ACCEPTED.equals(istatus.getValue()))
|
|
|
|
String email = attendee.getEmail();
|
|
|
|
status = CalendarContract.Events.STATUS_CONFIRMED;
|
|
|
|
for (Address to : message.to) {
|
|
|
|
else if (Status.CANCELLED.equals(istatus.getValue()))
|
|
|
|
String recipient = ((InternetAddress) to).getAddress();
|
|
|
|
status = CalendarContract.Events.STATUS_CANCELED;
|
|
|
|
if (!TextUtils.isEmpty(email) && email.equalsIgnoreCase(recipient)) {
|
|
|
|
|
|
|
|
ParticipationStatus pstatus = attendee.getParticipationStatus();
|
|
|
|
|
|
|
|
if (ParticipationStatus.ACCEPTED.equals(pstatus))
|
|
|
|
|
|
|
|
status = CalendarContract.Events.STATUS_CONFIRMED;
|
|
|
|
|
|
|
|
else if (ParticipationStatus.DECLINED.equals(pstatus))
|
|
|
|
|
|
|
|
status = CalendarContract.Events.STATUS_CANCELED;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (status == CalendarContract.Events.STATUS_CANCELED) {
|
|
|
|
|
|
|
|
CalendarHelper.delete(context, event, message);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (status == CalendarContract.Events.STATUS_TENTATIVE && !ical_tentative) {
|
|
|
|
if (status == CalendarContract.Events.STATUS_TENTATIVE && !ical_tentative) {
|
|
|
|