1.1 --- a/imiptools/__init__.py Thu Aug 20 22:45:00 2015 +0200
1.2 +++ b/imiptools/__init__.py Thu Aug 20 23:52:18 2015 +0200
1.3 @@ -227,12 +227,18 @@
1.4 for name, cls in self.handlers])
1.5 handled = False
1.6
1.7 + # Check for returned messages.
1.8 +
1.9 for part in msg.walk():
1.10 - if part.get_content_type() in itip_content_types and \
1.11 - part.get_param("method"):
1.12 + if part.get_content_type() == "message/delivery-status":
1.13 + break
1.14 + else:
1.15 + for part in msg.walk():
1.16 + if part.get_content_type() in itip_content_types and \
1.17 + part.get_param("method"):
1.18
1.19 - handle_itip_part(part, handlers)
1.20 - handled = True
1.21 + handle_itip_part(part, handlers)
1.22 + handled = True
1.23
1.24 # When processing outgoing messages, no replies or deliveries are
1.25 # performed.
2.1 --- a/imiptools/handlers/person.py Thu Aug 20 22:45:00 2015 +0200
2.2 +++ b/imiptools/handlers/person.py Thu Aug 20 23:52:18 2015 +0200
2.3 @@ -152,8 +152,8 @@
2.4
2.5 "Queue a cancellation of any active event."
2.6
2.7 - self._record(from_organiser=True, queue=False, cancel=True)
2.8 - return self.wrap("A cancellation has been received.", link=False)
2.9 + if self._record(from_organiser=True, queue=False, cancel=True):
2.10 + return self.wrap("A cancellation has been received.", link=False)
2.11
2.12 def counter(self):
2.13
2.14 @@ -163,7 +163,7 @@
2.15
2.16 def declinecounter(self):
2.17
2.18 - # NOTE: Queue a suggested modification to any active event.
2.19 + # NOTE: Queue a rejected modification to any active event.
2.20
2.21 return self.wrap("A declining counter proposal has been received.", link=False)
2.22
2.23 @@ -171,8 +171,8 @@
2.24
2.25 "Register details of any relevant event."
2.26
2.27 - self._record(from_organiser=True, queue=False)
2.28 - return self.wrap("Details of an event have been received.")
2.29 + if self._record(from_organiser=True, queue=False):
2.30 + return self.wrap("Details of an event have been received.")
2.31
2.32 def refresh(self):
2.33
2.34 @@ -186,15 +186,15 @@
2.35
2.36 "Record replies and notify the recipient."
2.37
2.38 - self._record(from_organiser=False, queue=False)
2.39 - return self.wrap("A reply has been received.")
2.40 + if self._record(from_organiser=False, queue=False):
2.41 + return self.wrap("A reply has been received.")
2.42
2.43 def request(self):
2.44
2.45 "Hold requests and notify the recipient."
2.46
2.47 - self._record(from_organiser=True, queue=True)
2.48 - return self.wrap("A request has been received.")
2.49 + if self._record(from_organiser=True, queue=True):
2.50 + return self.wrap("A request has been received.")
2.51
2.52 class Freebusy(PersonHandler, CommonFreebusy):
2.53