(feat) we now "cc" delegates during invitation updates (fixes #3195)
parent
2c038d641a
commit
fee310908b
1
NEWS
1
NEWS
|
@ -8,6 +8,7 @@ New features
|
|||
Enhancements
|
||||
- [web] updated Angular Material to version 1.0.6
|
||||
- [web] added Lithuanan (lt) translation - thanks to Mantas Liobė
|
||||
- [web] we now "cc" delegates during invitation updates (#3195)
|
||||
|
||||
Bug fixes
|
||||
- [web] fixed missing columns in SELECT statements (PostgreSQL)
|
||||
|
|
|
@ -905,12 +905,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
#warning fix this when sendEmailUsing blabla has been cleaned up
|
||||
- (void) sendIMIPReplyForEvent: (iCalRepeatableEntityObject *) event
|
||||
//
|
||||
//
|
||||
//
|
||||
- (void) _sendIMIPReplyForEvent: (iCalRepeatableEntityObject *) event
|
||||
from: (SOGoUser *) from
|
||||
to: (iCalPerson *) recipient
|
||||
textOnly: (BOOL) textOnly
|
||||
{
|
||||
NSString *pageName, *mailDate, *email;
|
||||
NSString *mailDate, *email;
|
||||
WOApplication *app;
|
||||
iCalPerson *attendee;
|
||||
SOGoAptMailICalReply *p;
|
||||
|
@ -922,15 +925,12 @@
|
|||
SOGoDomainDefaults *dd;
|
||||
|
||||
dd = [from domainDefaults];
|
||||
if ([dd appointmentSendEMailNotifications] && [event isStillRelevant])
|
||||
{
|
||||
|
||||
/* get WOApplication instance */
|
||||
app = [WOApplication application];
|
||||
|
||||
/* create page name */
|
||||
pageName = @"SOGoAptMailICalReply";
|
||||
/* construct message content */
|
||||
p = [app pageWithName: pageName inContext: context];
|
||||
p = [app pageWithName: @"SOGoAptMailICalReply" inContext: context];
|
||||
[p setApt: (iCalEvent *) event];
|
||||
|
||||
attendee = [event userAsAttendee: from];
|
||||
|
@ -953,19 +953,30 @@
|
|||
forKey: @"subject"];
|
||||
[headerMap setObject: [NSString generateMessageID] forKey: @"message-id"];
|
||||
[headerMap setObject: @"1.0" forKey: @"MIME-Version"];
|
||||
|
||||
if (textOnly)
|
||||
[headerMap setObject: @"text/html" forKey: @"content-type"];
|
||||
else
|
||||
[headerMap setObject: @"multipart/mixed" forKey: @"content-type"];
|
||||
|
||||
[headerMap setObject: @"calendar:invitation-reply" forKey: @"x-sogo-message-type"];
|
||||
msg = [NGMimeMessage messageWithHeader: headerMap];
|
||||
|
||||
/* multipart body */
|
||||
body = [[NGMimeMultipartBody alloc] initWithPart: msg];
|
||||
|
||||
/* text part */
|
||||
headerMap = [NGMutableHashMap hashMapWithCapacity: 1];
|
||||
[headerMap setObject: @"text/html; charset=utf-8"
|
||||
forKey: @"content-type"];
|
||||
bodyPart = [NGMimeBodyPart bodyPartWithHeader: headerMap];
|
||||
bodyData = [[p getBody] dataUsingEncoding: NSUTF8StringEncoding];
|
||||
|
||||
if (textOnly)
|
||||
{
|
||||
[msg setBody: bodyData];
|
||||
}
|
||||
else
|
||||
{
|
||||
/* multipart body */
|
||||
body = [[NGMimeMultipartBody alloc] initWithPart: msg];
|
||||
[bodyPart setBody: bodyData];
|
||||
|
||||
/* attach text part to multipart body */
|
||||
|
@ -977,6 +988,7 @@
|
|||
/* attach multipart body to message */
|
||||
[msg setBody: body];
|
||||
[body release];
|
||||
}
|
||||
|
||||
/* send the damn thing */
|
||||
email = [recipient rfc822Email];
|
||||
|
@ -987,6 +999,41 @@
|
|||
withAuthenticator: [self authenticatorInContext: context]
|
||||
inContext: context];
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (void) sendIMIPReplyForEvent: (iCalRepeatableEntityObject *) event
|
||||
from: (SOGoUser *) from
|
||||
to: (iCalPerson *) recipient
|
||||
{
|
||||
SOGoDomainDefaults *dd;
|
||||
|
||||
dd = [from domainDefaults];
|
||||
if ([dd appointmentSendEMailNotifications] && [event isStillRelevant])
|
||||
{
|
||||
// We first send to the real recipient (organizer)
|
||||
[self _sendIMIPReplyForEvent: event
|
||||
from: from
|
||||
to: recipient
|
||||
textOnly: NO];
|
||||
|
||||
// If we have a sent-by, we send it to it also. This is useful since
|
||||
// if Alice is Bob's asssitant and invites Tony, when Tony accepts/declines
|
||||
// the event, Alice will also be informed about this. See #3195 for details.
|
||||
if ([recipient hasSentBy])
|
||||
{
|
||||
iCalPerson *sentBy;
|
||||
|
||||
sentBy = [[[iCalPerson alloc] init] autorelease];
|
||||
[sentBy setEmail: [recipient sentBy]];
|
||||
[self _sendIMIPReplyForEvent: event
|
||||
from: from
|
||||
to: sentBy
|
||||
textOnly: YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue