(fix) make sure sure email invitations can always be read by EAS clients
parent
4826f01555
commit
f666b436dd
|
@ -49,6 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#import <NGImap4/NGImap4EnvelopeAddress.h>
|
#import <NGImap4/NGImap4EnvelopeAddress.h>
|
||||||
#import <NGImap4/NSString+Imap4.h>
|
#import <NGImap4/NSString+Imap4.h>
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
|
#import <NGObjWeb/WOApplication.h>
|
||||||
|
|
||||||
#import <NGMime/NGMimeBodyPart.h>
|
#import <NGMime/NGMimeBodyPart.h>
|
||||||
#import <NGMime/NGMimeFileData.h>
|
#import <NGMime/NGMimeFileData.h>
|
||||||
|
@ -74,6 +75,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <SOGo/SOGoUser.h>
|
#include <SOGo/SOGoUser.h>
|
||||||
#include <SOGo/NSString+Utilities.h>
|
#include <SOGo/NSString+Utilities.h>
|
||||||
|
|
||||||
|
#import <Appointments/SOGoAptMailNotification.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t dwLowDateTime;
|
uint32_t dwLowDateTime;
|
||||||
uint32_t dwHighDateTime;
|
uint32_t dwHighDateTime;
|
||||||
|
@ -452,7 +455,7 @@ struct GlobalObjectId {
|
||||||
// We get the right part based on the preference
|
// We get the right part based on the preference
|
||||||
if (theType == 1 || theType == 2)
|
if (theType == 1 || theType == 2)
|
||||||
{
|
{
|
||||||
if ([type isEqualToString: @"text"])
|
if ([type isEqualToString: @"text"] && ![subtype isEqualToString: @"calendar"])
|
||||||
{
|
{
|
||||||
NSString *s, *charset;
|
NSString *s, *charset;
|
||||||
|
|
||||||
|
@ -511,9 +514,37 @@ struct GlobalObjectId {
|
||||||
- (iCalCalendar *) calendarFromIMIPMessage
|
- (iCalCalendar *) calendarFromIMIPMessage
|
||||||
{
|
{
|
||||||
NSDictionary *part;
|
NSDictionary *part;
|
||||||
|
NSString *type, *subtype;
|
||||||
NSArray *parts;
|
NSArray *parts;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
type = [[[self bodyStructure] valueForKey: @"type"] lowercaseString];
|
||||||
|
subtype = [[[self bodyStructure] valueForKey: @"subtype"] lowercaseString];
|
||||||
|
|
||||||
|
// process mail of type text/calendar
|
||||||
|
if ([type isEqualToString: @"text"] && [subtype isEqualToString: @"calendar"])
|
||||||
|
{
|
||||||
|
iCalCalendar *calendar;
|
||||||
|
NSString *encoding;
|
||||||
|
NSData *calendarData;
|
||||||
|
|
||||||
|
encoding = [[[self bodyStructure] valueForKey: @"encoding"] lowercaseString];
|
||||||
|
calendarData = [[self fetchPlainTextParts] objectForKey: @""];
|
||||||
|
|
||||||
|
if ([encoding caseInsensitiveCompare: @"base64"] == NSOrderedSame)
|
||||||
|
calendarData = [calendarData dataByDecodingBase64];
|
||||||
|
else if ([encoding caseInsensitiveCompare: @"quoted-printable"] == NSOrderedSame)
|
||||||
|
calendarData = [calendarData dataByDecodingQuotedPrintableTransferEncoding];
|
||||||
|
|
||||||
|
NS_DURING
|
||||||
|
calendar = [iCalCalendar parseSingleFromSource: calendarData];
|
||||||
|
NS_HANDLER
|
||||||
|
calendar = nil;
|
||||||
|
NS_ENDHANDLER
|
||||||
|
|
||||||
|
return calendar;
|
||||||
|
}
|
||||||
|
|
||||||
// We check if we have at least 2 parts and if one of them is a text/calendar
|
// We check if we have at least 2 parts and if one of them is a text/calendar
|
||||||
parts = [[self bodyStructure] objectForKey: @"parts"];
|
parts = [[self bodyStructure] objectForKey: @"parts"];
|
||||||
|
|
||||||
|
@ -783,6 +814,39 @@ struct GlobalObjectId {
|
||||||
|
|
||||||
nativeBodyType = 1;
|
nativeBodyType = 1;
|
||||||
d = [self _preferredBodyDataUsingType: preferredBodyType nativeType: &nativeBodyType];
|
d = [self _preferredBodyDataUsingType: preferredBodyType nativeType: &nativeBodyType];
|
||||||
|
|
||||||
|
if (calendar && !d)
|
||||||
|
{
|
||||||
|
WOApplication *app;
|
||||||
|
SOGoAptMailNotification *p;
|
||||||
|
NSString *pageName;
|
||||||
|
|
||||||
|
nativeBodyType = 2;
|
||||||
|
|
||||||
|
/* get WOApplication instance */
|
||||||
|
app = [WOApplication application];
|
||||||
|
|
||||||
|
/* create page name */
|
||||||
|
pageName = [NSString stringWithFormat: @"SOGoAptMail%@", @"Invitation"];
|
||||||
|
/* construct message content */
|
||||||
|
p = [app pageWithName: pageName inContext: context];
|
||||||
|
[p setApt: (iCalEvent *) [[calendar events] lastObject]];
|
||||||
|
|
||||||
|
if ([[ [[calendar events] lastObject] organizer] cn] && [[[ [[calendar events] lastObject] organizer] cn] length])
|
||||||
|
{
|
||||||
|
[p setOrganizerName: [[ [[calendar events] lastObject] organizer] cn]];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[p setOrganizerName: [[SOGoUser userWithLogin: owner] cn]];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preferredBodyType == 1 && nativeBodyType == 2)
|
||||||
|
d = [[[p getBody] htmlToText] dataUsingEncoding: NSUTF8StringEncoding];
|
||||||
|
else
|
||||||
|
d = [[p getBody] dataUsingEncoding: NSUTF8StringEncoding];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (d)
|
if (d)
|
||||||
{
|
{
|
||||||
|
|
43
NEWS
43
NEWS
|
@ -9,13 +9,14 @@ Enhancements
|
||||||
- added systemd startup script (PR#76)
|
- added systemd startup script (PR#76)
|
||||||
- added Basque translation - thanks to Gorka Gonzalez
|
- added Basque translation - thanks to Gorka Gonzalez
|
||||||
- updated Brazilian (Portuguese), Dutch, Norwegian (Bokmal), Polish, Russian, and Spanish (Spain) translations Enhancements
|
- updated Brazilian (Portuguese), Dutch, Norwegian (Bokmal), Polish, Russian, and Spanish (Spain) translations Enhancements
|
||||||
- Sharing request among different Outlook versions (Zentyal)
|
- sharing request among different Outlook versions (Zentyal)
|
||||||
- Improve sync speed from Outlook by non-reprocessing already downloaded unread mails (Zentyal)
|
- improve sync speed from Outlook by non-reprocessing already downloaded unread mails (Zentyal)
|
||||||
- Give support to calendar sharing invitations
|
- give support to calendar sharing invitations
|
||||||
- Missing contact fields are now saved and available when sharing it (Office, Profession, Manager's name, Assistant's name, Spouse/Partner, Anniversary) (Zentyal)
|
- missing contact fields are now saved and available when sharing it (Office, Profession, Manager's name, Assistant's name, Spouse/Partner, Anniversary) (Zentyal)
|
||||||
- Appointment color and importance work now between Outlooks (Zentyal)
|
- appointment color and importance work now between Outlooks (Zentyal)
|
||||||
- Synchronize events, contacts and tasks in reverse chronological order (Zentyal)
|
- synchronize events, contacts and tasks in reverse chronological order (Zentyal)
|
||||||
- During login, we now extract the domain from the user to accelerate authentication requests on sources
|
- during login, we now extract the domain from the user to accelerate authentication requests on sources
|
||||||
|
- make sure sure email invitations can always be read by EAS clients
|
||||||
|
|
||||||
Bug fixes
|
Bug fixes
|
||||||
- now keep the BodyPreference for future EAS use and default to MIME if none set (#3146)
|
- now keep the BodyPreference for future EAS use and default to MIME if none set (#3146)
|
||||||
|
@ -29,21 +30,21 @@ Bug fixes
|
||||||
- fixed serialization of the PreventInvitationsWhitelist settings
|
- fixed serialization of the PreventInvitationsWhitelist settings
|
||||||
- fixed md4 support (for NTLM password changes) with GNU TLS
|
- fixed md4 support (for NTLM password changes) with GNU TLS
|
||||||
- fixed edition of attachment URL in event/task editor
|
- fixed edition of attachment URL in event/task editor
|
||||||
- Sent mails are not longer in Drafts folder using Outlook (Zentyal)
|
- sent mails are not longer in Drafts folder using Outlook (Zentyal)
|
||||||
- Deleted mails are properly synced between Outlook profiles from the same account (Zentyal)
|
- deleted mails are properly synced between Outlook profiles from the same account (Zentyal)
|
||||||
- Does not create a mail folder in other user's mailbox (Zentyal)
|
- does not create a mail folder in other user's mailbox (Zentyal)
|
||||||
- Fix server-side crash with invalid events (Zentyal)
|
- fix server-side crash with invalid events (Zentyal)
|
||||||
- Fix setting permissions for a folder with several users (Zentyal)
|
- fix setting permissions for a folder with several users (Zentyal)
|
||||||
- Fix reception of calendar event invitations on optional attendees (Zentyal)
|
- fix reception of calendar event invitations on optional attendees (Zentyal)
|
||||||
- Fix server side crash parsing rtf without color table (Zentyal)
|
- fix server side crash parsing rtf without color table (Zentyal)
|
||||||
- Weekly recurring events created in SOGo web interface are now shown in Outlook (Zentyal)
|
- weekly recurring events created in SOGo web interface are now shown in Outlook (Zentyal)
|
||||||
- Fix exception modifications import in recurrence series (Zentyal)
|
- fix exception modifications import in recurrence series (Zentyal)
|
||||||
- Fix server side crash parsing rtf emails with images (with word97 format) (Zentyal)
|
- fix server side crash parsing rtf emails with images (with word97 format) (Zentyal)
|
||||||
- Fix sender on importing email messages like event invitations (Zentyal)
|
- fix sender on importing email messages like event invitations (Zentyal)
|
||||||
- Fix Outlook crashes when modifying the view of a folder (Zentyal)
|
- fix Outlook crashes when modifying the view of a folder (Zentyal)
|
||||||
- Fix server side crash when reading some recurrence appointments (Zentyal)
|
- fix server side crash when reading some recurrence appointments (Zentyal)
|
||||||
- Outlook clients can use reply all functionality on multidomain environment (Zentyal)
|
- Outlook clients can use reply all functionality on multidomain environment (Zentyal)
|
||||||
- Optional attendes on events are now shown properly (Zentyal)
|
- optional attendes on events are now shown properly (Zentyal)
|
||||||
- fixed the EAS maximum response size being per-folder, and not global
|
- fixed the EAS maximum response size being per-folder, and not global
|
||||||
|
|
||||||
2.2.17a (2015-03-15)
|
2.2.17a (2015-03-15)
|
||||||
|
|
Loading…
Reference in New Issue