From b1e08272471d186687b71a78b2b249642c168e6d Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 18 Jul 2005 00:00:11 +0000 Subject: [PATCH] added iMIP reply things git-svn-id: http://svn.opengroupware.org/SOGo/trunk@780 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/MailPartViewers/ChangeLog | 5 ++ .../MailPartViewers/UIxMailPartICalViewer.m | 50 +++++++++++++++++++ SOGo/UI/MailPartViewers/Version | 2 +- .../MailPartViewers/UIxMailPartICalViewer.wox | 19 +++++-- 4 files changed, 72 insertions(+), 4 deletions(-) diff --git a/SOGo/UI/MailPartViewers/ChangeLog b/SOGo/UI/MailPartViewers/ChangeLog index b3090541..b8ce7026 100644 --- a/SOGo/UI/MailPartViewers/ChangeLog +++ b/SOGo/UI/MailPartViewers/ChangeLog @@ -1,3 +1,8 @@ +2005-07-18 Helge Hess + + * UIxMailPartICalViewer.m: added code to support iMIP REPLY messages + (v0.9.12) + 2005-07-15 Helge Hess * v0.9.11 diff --git a/SOGo/UI/MailPartViewers/UIxMailPartICalViewer.m b/SOGo/UI/MailPartViewers/UIxMailPartICalViewer.m index c380e787..f0484bbd 100644 --- a/SOGo/UI/MailPartViewers/UIxMailPartICalViewer.m +++ b/SOGo/UI/MailPartViewers/UIxMailPartICalViewer.m @@ -48,7 +48,9 @@ #include #include #include +#include #include +#include #include "common.h" @implementation UIxMailPartICalViewer @@ -268,6 +270,54 @@ return @"[todo: no organizer set, use 'from']"; } +/* replies */ + +- (NGImap4EnvelopeAddress *)replySenderAddress { + /* + The iMIP reply is the sender of the mail, the 'attendees' are NOT set to + the actual attendees. BUT the attendee field contains the reply-status! + */ + id tmp; + + tmp = [[self clientObject] fromEnvelopeAddresses]; + if ([tmp count] == 0) return nil; + return [tmp objectAtIndex:0]; +} + +- (NSString *)replySenderEMail { + return [[self replySenderAddress] email]; +} +- (NSString *)replySenderBaseEMail { + return [[self replySenderAddress] baseEMail]; +} + +- (iCalPerson *)inReplyAttendee { + NSArray *attendees; + + attendees = [[self inEvent] attendees]; + if ([attendees count] == 0) + return nil; + if ([attendees count] > 1) + [self warnWithFormat:@"More than one attendee in REPLY: %@", attendees]; + + return [attendees objectAtIndex:0]; +} +- (iCalPerson *)storedReplyAttendee { + iCalEvent *e; + iCalPerson *p; + + if ((e = [self storedEvent]) == nil) + return nil; + if ((p = [e findParticipantWithEmail:[self replySenderBaseEMail]])) + return p; + if ((p = [e findParticipantWithEmail:[self replySenderEMail]])) + return p; + return nil; +} +- (BOOL)isReplySenderAnAttendee { + return [[self storedReplyAttendee] isNotNull]; +} + /* action URLs */ - (id)acceptLink { diff --git a/SOGo/UI/MailPartViewers/Version b/SOGo/UI/MailPartViewers/Version index 68e2d82e..cb1c5948 100644 --- a/SOGo/UI/MailPartViewers/Version +++ b/SOGo/UI/MailPartViewers/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=11 +SUBMINOR_VERSION:=12 # v0.9.0 requires libNGiCal v4.5.53 # v0.9.1 requires libNGMime v4.5.213 diff --git a/SOGo/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox b/SOGo/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox index 00494e4f..3b550069 100644 --- a/SOGo/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox +++ b/SOGo/UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox @@ -68,6 +68,19 @@

iMIP 'REPLY' requests are not yet supported by SOGo. +
+ From: + +
+ Status Update: + , + + was: + . + + + the sender is not registered as an attendee! +

@@ -130,7 +143,7 @@ : - @@ -138,7 +151,7 @@ : - + () @@ -157,7 +170,7 @@ : - + -- 2.39.5