1.1 --- a/imiptools/handlers/resource.py Tue Oct 28 22:59:00 2014 +0100
1.2 +++ b/imiptools/handlers/resource.py Tue Oct 28 23:01:26 2014 +0100
1.3 @@ -4,7 +4,7 @@
1.4 Handlers for a resource.
1.5 """
1.6
1.7 -from imiptools.content import Handler, format_datetime, to_part
1.8 +from imiptools.content import Handler, format_datetime, get_address, get_uri, to_part
1.9 from vCalendar import to_node
1.10
1.11 class Event(Handler):
1.12 @@ -78,6 +78,8 @@
1.13 scheduled = self.can_schedule(freebusy, periods)
1.14
1.15 attendee_attr["PARTSTAT"] = scheduled and "ACCEPTED" or "DECLINED"
1.16 + if self.messenger and self.messenger.sender != get_address(attendee):
1.17 + attendee_attr["SENT-BY"] = get_uri(self.messenger.sender)
1.18 self.details["ATTENDEE"] = [(attendee, attendee_attr)]
1.19
1.20 event = to_node({"VEVENT" : [(self.details, {})]})