# HG changeset patch # User Paul Boddie # Date 1509489980 -3600 # Node ID b4136058710415045a6257c8e5abca186646f760 # Parent 8978b422905b3c3e7dd7f6d69373fde12a0ecce3 Permit the generation of cancellation messages for all attendees. diff -r 8978b422905b -r b41360587104 imiptools/client.py --- a/imiptools/client.py Tue Oct 31 23:45:34 2017 +0100 +++ b/imiptools/client.py Tue Oct 31 23:46:20 2017 +0100 @@ -983,17 +983,19 @@ """ Prepare an event cancellation message involving the participants in the - 'to_cancel' mapping. + 'to_cancel' mapping or involving all participants if 'to_cancel' is not + specified or empty. """ - if not to_cancel: - return None + obj = self.obj.copy() - obj = self.obj.copy() - obj["ATTENDEE"] = to_cancel.items() + if to_cancel: + obj["ATTENDEE"] = to_cancel.items() + + recipients = self.get_recipients(obj) parts = [self.object_to_part("CANCEL", obj)] - return self.make_message(parts, to_cancel.keys()) + return self.make_message(parts, recipients) def make_cancel_message_for_self(self, obj):