JSONify [UIxMailActions replyToAll:]
This commit is contained in:
parent
8c2bcc92b5
commit
9065a8038a
|
@ -48,20 +48,28 @@
|
||||||
{
|
{
|
||||||
SOGoMailAccount *account;
|
SOGoMailAccount *account;
|
||||||
SOGoMailObject *co;
|
SOGoMailObject *co;
|
||||||
SOGoDraftsFolder *folder;
|
SOGoDraftsFolder *drafts;
|
||||||
SOGoDraftObject *newMail;
|
SOGoDraftObject *newMail;
|
||||||
NSString *newLocation;
|
NSString *accountName, *mailboxName, *messageName;
|
||||||
|
NSDictionary *data;
|
||||||
|
|
||||||
co = [self clientObject];
|
co = [self clientObject];
|
||||||
account = [co mailAccountFolder];
|
account = [co mailAccountFolder];
|
||||||
folder = [account draftsFolderInContext: context];
|
drafts = [account draftsFolderInContext: context];
|
||||||
newMail = [folder newDraft];
|
newMail = [drafts newDraft];
|
||||||
[newMail fetchMailForReplying: co toAll: toAll];
|
[newMail fetchMailForReplying: co toAll: toAll];
|
||||||
|
|
||||||
newLocation = [NSString stringWithFormat: @"%@/edit",
|
accountName = [account nameInContainer];
|
||||||
[newMail baseURLInContext: context]];
|
mailboxName = [drafts relativeImap4Name];
|
||||||
|
messageName = [newMail nameInContainer];
|
||||||
|
|
||||||
return [self redirectToLocation: newLocation];
|
data = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
|
accountName, @"accountId",
|
||||||
|
mailboxName, @"mailboxPath",
|
||||||
|
messageName, @"draftId", nil];
|
||||||
|
|
||||||
|
return [self responseWithStatus: 201
|
||||||
|
andString: [data jsonRepresentation]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (WOResponse *) replyAction
|
- (WOResponse *) replyAction
|
||||||
|
|
Loading…
Reference in a new issue