diff --git a/UI/MailerUI/UIxMailActions.m b/UI/MailerUI/UIxMailActions.m index bff34d821..73472445a 100644 --- a/UI/MailerUI/UIxMailActions.m +++ b/UI/MailerUI/UIxMailActions.m @@ -1,6 +1,6 @@ /* UIxMailActions.m - this file is part of SOGo * - * Copyright (C) 2007-2013 Inverse inc. + * Copyright (C) 2007-2014 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,6 +32,7 @@ #import #import #import +#import #import #import #import @@ -223,13 +224,14 @@ } /* SOGoDraftObject */ -- (WOResponse *) editAction +- (id ) editAction { + id response; SOGoMailAccount *account; SOGoMailObject *co; SOGoDraftsFolder *folder; SOGoDraftObject *newMail; - NSString *newLocation; + NSDictionary *data; co = [self clientObject]; account = [co mailAccountFolder]; @@ -238,10 +240,13 @@ [newMail fetchMailForEditing: co]; [newMail storeInfo]; - newLocation = [NSString stringWithFormat: @"%@/edit", - [newMail baseURLInContext: context]]; + data = [NSDictionary dictionaryWithObject: [newMail nameInContainer] + forKey: @"draftId"]; - return [self redirectToLocation: newLocation]; + response = [self responseWithStatus: 200 + andString: [data jsonRepresentation]]; + + return response; } - (id) deleteAction