# HG changeset patch # User Paul Boddie # Date 1427805068 -7200 # Node ID f79c4c90021bc029a3c9c16447a4267d18ae9dcc # Parent f1588da520d0ed9dfe9f8ce39ab7ca81e44f8949 Only silently remove attendees if no sequence number has been set on an event. Otherwise, even if attendees have no participation status, they may have been sent the event and may then subsequently respond to a deleted or updated event. diff -r f1588da520d0 -r f79c4c90021b imiptools/client.py --- a/imiptools/client.py Sat Mar 28 01:11:56 2015 +0100 +++ b/imiptools/client.py Tue Mar 31 14:31:08 2015 +0200 @@ -35,13 +35,18 @@ if added or removed: attendees = uri_items(obj.get_items("ATTENDEE") or []) + sequence = obj.get_value("SEQUENCE") if removed: remaining = [] for attendee, attendee_attr in attendees: if attendee in removed: - if attendee_attr.get("PARTSTAT") in ("ACCEPTED", "TENTATIVE"): + + # Without a sequence number, assume that the event has not + # been published and that attendees can be silently removed. + + if sequence is not None: to_cancel.append((attendee, attendee_attr)) else: remaining.append((attendee, attendee_attr))