1.1 --- a/imiptools/handlers/resource.py Fri Apr 22 20:30:51 2016 +0200
1.2 +++ b/imiptools/handlers/resource.py Fri Apr 22 20:33:51 2016 +0200
1.3 @@ -19,6 +19,7 @@
1.4 this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 +from email.mime.text import MIMEText
1.8 from imiptools.data import get_address, to_part, uri_dict
1.9 from imiptools.handlers import Handler
1.10 from imiptools.handlers.common import CommonFreebusy, CommonEvent
1.11 @@ -92,7 +93,7 @@
1.12
1.13 # Attempt to schedule the event.
1.14
1.15 - scheduled = self.schedule()
1.16 + scheduled, description = self.schedule()
1.17
1.18 try:
1.19 # Update the participation of the resource in the object.
1.20 @@ -140,13 +141,19 @@
1.21 finally:
1.22 self.finish_scheduling()
1.23
1.24 + recipients = map(get_address, self.obj.get_values("ORGANIZER"))
1.25 +
1.26 + # Add any description of the scheduling decision.
1.27 +
1.28 + self.add_result(None, recipients, MIMEText(description))
1.29 +
1.30 # Make a version of the object with just this attendee, update the
1.31 # DTSTAMP in the response, and return the object for sending.
1.32
1.33 self.update_sender(attendee_attr)
1.34 self.obj["ATTENDEE"] = [(self.user, attendee_attr)]
1.35 self.update_dtstamp()
1.36 - self.add_result(method, map(get_address, self.obj.get_values("ORGANIZER")), to_part(method, [self.obj.to_node()]))
1.37 + self.add_result(method, recipients, to_part(method, [self.obj.to_node()]))
1.38
1.39 def _cancel_for_attendee(self):
1.40