1.1 --- a/imiptools/handlers/person_outgoing.py Tue Oct 13 17:10:40 2015 +0200
1.2 +++ b/imiptools/handlers/person_outgoing.py Tue Oct 13 18:34:26 2015 +0200
1.3 @@ -20,8 +20,7 @@
1.4 this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 -from imiptools.client import Client
1.8 -from imiptools.data import get_uri, uri_dict, uri_values
1.9 +from imiptools.data import uri_dict, uri_values
1.10 from imiptools.handlers import Handler
1.11 from imiptools.handlers.common import CommonEvent
1.12
1.13 @@ -29,34 +28,15 @@
1.14
1.15 "Handling mechanisms specific to people."
1.16
1.17 - def set_identity(self, method):
1.18 -
1.19 - """
1.20 - Set the current user for the current object in the context of the given
1.21 - 'method'. It is usually set when initialising the handler, using the
1.22 - recipient details, but outgoing messages do not reference the recipient
1.23 - in this way.
1.24 - """
1.25 -
1.26 - if self.obj:
1.27 - from_organiser = method in self.organiser_methods
1.28 - self.user = get_uri(self.obj.get_value(from_organiser and "ORGANIZER" or "ATTENDEE"))
1.29 -
1.30 def _add(self):
1.31
1.32 "Add a recurrence for the current object."
1.33
1.34 - if not Client.is_participating(self):
1.35 - return False
1.36 -
1.37 - # Obtain valid organiser and attendee details.
1.38 + # Check for event using UID.
1.39
1.40 - oa = self.require_organiser_and_attendees()
1.41 - if not oa:
1.42 + if not self.have_new_object():
1.43 return False
1.44
1.45 - (organiser, organiser_attr), attendees = oa
1.46 -
1.47 # Ignore unknown objects.
1.48
1.49 if not self.get_stored_object_version():
1.50 @@ -83,9 +63,6 @@
1.51 from an organiser if 'from_organiser' is set to a true value.
1.52 """
1.53
1.54 - if not Client.is_participating(self):
1.55 - return False
1.56 -
1.57 # Check for a new event, tolerating not-strictly-new events if the
1.58 # attendee is responding.
1.59
1.60 @@ -141,9 +118,6 @@
1.61 from an organiser if 'from_organiser' is set to a true value.
1.62 """
1.63
1.64 - if not Client.is_participating(self):
1.65 - return False
1.66 -
1.67 # Check for event using UID.
1.68
1.69 if not self.have_new_object():
1.70 @@ -210,9 +184,6 @@
1.71
1.72 "Remove any counter-proposals for the given event."
1.73
1.74 - if not Client.is_participating(self):
1.75 - return False
1.76 -
1.77 # Check for event using UID.
1.78
1.79 if not self.have_new_object():