1.1 --- a/imiptools/content.py Wed Oct 29 01:05:08 2014 +0100
1.2 +++ b/imiptools/content.py Wed Oct 29 18:46:58 2014 +0100
1.3 @@ -404,15 +404,26 @@
1.4 if not attendees or not organiser:
1.5 return None
1.6
1.7 + return organiser, attendees
1.8 +
1.9 + def validate_identities(self, items):
1.10 +
1.11 + """
1.12 + Validate the 'items' against the known senders, obtaining sent-by
1.13 + addresses from attributes provided by the items.
1.14 + """
1.15 +
1.16 # Reject organisers that do not match any senders.
1.17
1.18 - organiser_value, organiser_attr = self.get_item("ORGANIZER")
1.19 - sent_by = organiser_attr.get("SENT-BY")
1.20 + identities = []
1.21
1.22 - if not self.filter_by_senders([organiser_value] + (sent_by and [sent_by] or [])):
1.23 - return None
1.24 + for value, attr in items:
1.25 + identities.append(value)
1.26 + sent_by = attr.get("SENT-BY")
1.27 + if sent_by:
1.28 + identities.append(sent_by)
1.29
1.30 - return organiser, attendees
1.31 + return self.filter_by_senders(identities)
1.32
1.33 def have_new_object(self, attendee, objtype):
1.34