# HG changeset patch # User Paul Boddie # Date 1414533540 -3600 # Node ID 726bb4c65d5517f9ddf5b840f28e9d2c5fc50870 # Parent e9183115c2581f816ed70450d18b69c7df8c28a7 Made REPLY method description parts more descriptive by mentioning senders. diff -r e9183115c258 -r 726bb4c65d55 imiptools/handlers/person.py --- a/imiptools/handlers/person.py Tue Oct 28 22:39:40 2014 +0100 +++ b/imiptools/handlers/person.py Tue Oct 28 22:59:00 2014 +0100 @@ -44,6 +44,14 @@ return True + def reply(self): + + "Wrap any valid message and pass it on to the recipient." + + attendee = self.get_value("ATTENDEE") + if attendee: + return "REPLY", MIMEText("A reply has been received from %s." % attendee) + class Event(PersonHandler): "An event handler." @@ -101,10 +109,7 @@ "Record replies and notify the recipient." self._record_and_deliver("VEVENT", False) - - # The message is now wrapped and passed on to the recipient. - - return "REPLY", MIMEText("A reply has been received.") + return PersonHandler.reply(self) def request(self): @@ -134,10 +139,7 @@ "Record replies and notify the recipient." self._record_and_deliver("VFREEBUSY", False) - - # The message is now wrapped and passed on to the recipient. - - return "REPLY", MIMEText("A reply has been received.") + return PersonHandler.reply(self) def request(self): @@ -267,10 +269,7 @@ "Record replies and notify the recipient." self._record_and_deliver("VTODO", False) - - # The message is now wrapped and passed on to the recipient. - - return "REPLY", MIMEText("A reply has been received.") + return PersonHandler.reply(self) def request(self):