+2007-08-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
+
+ * SoObjects/Mailer/SOGoDraftObject.m: added support for the
+ "In-Reply-To" header field when replying.
+
+ * UI/MainUI/SOGoUserHomePage.m: add the "c_" prefix to the quick
+ table field names that are queried.
+
+ * SoObjects/Appointments/SOGoFreeBusyObject.m ([SOGoFreeBusyObject
+ -iCalStringForFreeBusyInfos:_infosfrom:_startDateto:_endDate]):
+ add the "c_" prefix to the quick table field names that are
+ queried.
+
2007-08-24 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentFolder.m
static NSString *contentTypeValue = @"text/plain; charset=utf-8";
static NSString *headerKeys[] = {@"subject", @"to", @"cc", @"bcc",
- @"from", @"replyTo", nil};
+ @"from", @"replyTo",
+ nil};
@implementation SOGoDraftObject
text = @"";
sourceURL = nil;
sourceFlag = nil;
+ inReplyTo = nil;
}
return self;
[path release];
[sourceURL release];
[sourceFlag release];
+ [inReplyTo release];
[super dealloc];
}
id headerValue;
unsigned int count;
- for (count = 0; count < 6; count++)
+ for (count = 0; count < 7; count++)
{
headerValue = [newHeaders objectForKey: headerKeys[count]];
if (headerValue)
return text;
}
+- (void) setInReplyTo: (NSString *) newInReplyTo
+{
+ ASSIGN (inReplyTo, newInReplyTo);
+}
+
- (void) setSourceURL: (NSString *) newSourceURL
{
ASSIGN (sourceURL, newSourceURL);
[infos setObject: headers forKey: @"headers"];
if (text)
[infos setObject: text forKey: @"text"];
+ if (inReplyTo)
+ [infos setObject: inReplyTo forKey: @"inReplyTo"];
if (IMAP4ID > -1)
[infos setObject: [NSNumber numberWithInt: IMAP4ID]
forKey: @"IMAP4ID"];
value = [infoDict objectForKey: @"sourceFlag"];
if (value)
[self setSourceFlag: value];
+
+ value = [infoDict objectForKey: @"inReplyTo"];
+ if (value)
+ [self setInReplyTo: value];
}
- (NSString *) relativeImap4Name
- (void) fetchMailForReplying: (SOGoMailObject *) sourceMail
toAll: (BOOL) toAll
{
- NSString *contentForReply;
+ NSString *contentForReply, *msgID;
NSMutableDictionary *info;
+ NGImap4Envelope *sourceEnvelope;
[sourceMail fetchCoreInfos];
info = [NSMutableDictionary dictionaryWithCapacity: 16];
[info setObject: [sourceMail subjectForReply] forKey: @"subject"];
+
+ sourceEnvelope = [sourceMail envelope];
[self _fillInReplyAddresses: info replyToAll: toAll
- envelope: [sourceMail envelope]];
+ envelope: sourceEnvelope];
+ msgID = [sourceEnvelope messageID];
+ if ([msgID length] > 0)
+ [self setInReplyTo: msgID];
contentForReply = [sourceMail contentForReply];
[self setText: contentForReply];
[self setHeaders: info];
[map setObjects:[map objectsForKey: @"from"] forKey: @"reply-to"];
/* add subject */
-
+ if (inReplyTo)
+ [map setObject: inReplyTo forKey: @"in-reply-to"];
+
if ([(s = [headers objectForKey: @"subject"]) length] > 0)
[map setObject: [s asQPSubjectString: @"utf-8"]
forKey: @"subject"];
@implementation UIxMailEditor
-static BOOL keepMailTmpFile = NO;
static BOOL showInternetMarker = NO;
static BOOL useLocationBasedSentFolder = NO;
static NSDictionary *internetMailHeaders = nil;
infoKeys = [[NSArray alloc] initWithObjects:
@"subject", @"to", @"cc", @"bcc",
- @"from", @"replyTo",
+ @"from", @"replyTo", @"inReplyTo",
nil];
- keepMailTmpFile = [ud boolForKey:@"SOGoMailEditorKeepTmpFile"];
- if (keepMailTmpFile)
- NSLog(@"WARNING: keeping mail files.");
-
useLocationBasedSentFolder =
[ud boolForKey:@"SOGoUseLocationBasedSentFolder"];
record = [records nextObject];
while (record)
{
- status = [record objectForKey: @"status"];
+ status = [record objectForKey: @"c_status"];
- value = [[record objectForKey: @"startdate"] intValue];
+ value = [[record objectForKey: @"c_startdate"] intValue];
currentDate = [NSCalendarDate dateWithTimeIntervalSince1970: value];
if ([currentDate earlierDate: startDate] == currentDate)
startInterval = 0;
startInterval
= ([currentDate timeIntervalSinceDate: startDate] / 900);
- value = [[record objectForKey: @"enddate"] intValue];
+ value = [[record objectForKey: @"c_enddate"] intValue];
currentDate = [NSCalendarDate dateWithTimeIntervalSince1970: value];
if ([currentDate earlierDate: endDate] == endDate)
endInterval = [items count] - 1;