1.1 --- a/imiptools/handlers/resource.py Wed May 20 13:41:23 2015 +0200
1.2 +++ b/imiptools/handlers/resource.py Wed May 20 15:06:33 2015 +0200
1.3 @@ -19,7 +19,7 @@
1.4 this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 -from imiptools.data import get_address, get_uri, to_part
1.8 +from imiptools.data import get_address, to_part
1.9 from imiptools.handlers import Handler
1.10 from imiptools.handlers.common import CommonFreebusy, Outgoing
1.11
1.12 @@ -27,18 +27,6 @@
1.13
1.14 "Handling mechanisms specific to resources."
1.15
1.16 - def set_participation(self, scheduled):
1.17 -
1.18 - "Set the user's participation in the current object if 'scheduled'."
1.19 -
1.20 - attendee_attr = self.obj.get_value_map("ATTENDEE").get(self.user)
1.21 - attendee_attr["PARTSTAT"] = scheduled and "ACCEPTED" or "DECLINED"
1.22 - if attendee_attr.has_key("RSVP"):
1.23 - del attendee_attr["RSVP"]
1.24 - if self.messenger and self.messenger.sender != get_address(self.user):
1.25 - attendee_attr["SENT-BY"] = get_uri(self.messenger.sender)
1.26 - return attendee_attr
1.27 -
1.28 def _record_and_respond(self, handle_for_attendee):
1.29
1.30 """
1.31 @@ -89,7 +77,8 @@
1.32
1.33 # Update the participation of the resource in the object.
1.34
1.35 - attendee_attr = self.set_participation(scheduled)
1.36 + attendee_attr = self.update_participation(self.obj,
1.37 + scheduled and "ACCEPTED" or "DECLINED")
1.38
1.39 # Set the complete event or an additional occurrence.
1.40